Team
- class github.Team.Team
This class represents Teams.
The reference can be found here https://docs.github.com/en/rest/reference/teams
The OpenAPI schema can be found at
/components/schemas/enterprise-team
/components/schemas/nullable-team-simple
/components/schemas/team
/components/schemas/team-full
/components/schemas/team-simple
A CompletableGithubObject can be partially initialised (completed=False). Accessing attributes that are not initialized will then trigger a request to complete all attributes.
A partially initialized CompletableGithubObject (completed=False) can be completed via
complete(). This requires the url to be given via parameterurlorattributes.With a requester where
Requester.is_lazy == True, this CompletableGithubObjects is partially initialized. This requires the url to be given via parameterurlorattributes. Any CompletableGithubObject created from this lazy object will be lazy itself if created with parameterurlorattributes.- Parameters:
requester – requester
headers – response headers
attributes – attributes to initialize
completed – do not update non-initialized attributes when True
url – url of this instance, overrides attributes[‘url’]
accept – use this accept header when completing this instance
- add_to_members(member: NamedUser) None
This API call is deprecated. Use add_membership instead. https://docs.github.com/en/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy
- get_team_membership(member: str | NamedUser) Membership
- add_to_repos(repo: str | Repository) None
- get_repo_permission(repo: str | Repository) Permissions | None
- set_repo_permission(repo: str | Repository, permission: str) None
- Calls:
- Parameters:
repo –
github.Repository.Repositorypermission – string
- Return type:
None
- update_team_repository(repo: str | Repository, permission: str) bool
- delete() None
- Calls:
- edit(name: str, description: str | _NotSetType = NotSet, permission: str | _NotSetType = NotSet, privacy: str | _NotSetType = NotSet, parent_team_id: int | _NotSetType = NotSet, notification_setting: str | _NotSetType = NotSet) None
- Calls:
- get_teams() PaginatedList[Team]
- Calls:
- get_discussions() PaginatedList[TeamDiscussion]
- get_members(role: Opt[str] = NotSet) PaginatedList[NamedUser]
- Calls:
- get_repos() PaginatedList[Repository]
- Calls:
- invitations() PaginatedList[OrganizationInvitation]
- has_in_repos(repo: str | Repository) bool
- remove_from_members(member: NamedUser) None
This API call is deprecated. Use remove_membership instead: https://docs.github.com/en/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy
- remove_from_repos(repo: str | Repository) None