Team

class github.Team.Team

This class represents Teams.

The reference can be found here https://docs.github.com/en/rest/reference/teams

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

Calls

PUT /teams/{id}/members/{user}

add_membership(member: NamedUser, role: Opt[str] = NotSet) → None
Calls

PUT /teams/{id}/memberships/{user}

get_team_membership(member: str | NamedUser) → Membership
Calls

GET /orgs/{org}/memberships/team/{team_id}/{username}

add_to_repos(repo: Repository) → None
Calls

PUT /teams/{id}/repos/{org}/{repo}

get_repo_permission(repo: Repository) → Permissions | None
Calls

GET /teams/{id}/repos/{org}/{repo}

set_repo_permission(repo: Repository, permission: str) → None
Calls

PUT /teams/{id}/repos/{org}/{repo}

Parameters
Return type

None

update_team_repository(repo: Repository, permission: str) → bool
Calls

PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}

delete() → None
Calls

DELETE /teams/{id}

edit(name: str, description: Union[str, github.GithubObject._NotSetType] = NotSet, permission: Union[str, github.GithubObject._NotSetType] = NotSet, privacy: Union[str, github.GithubObject._NotSetType] = NotSet, parent_team_id: Union[int, github.GithubObject._NotSetType] = NotSet, notification_setting: Union[str, github.GithubObject._NotSetType] = NotSet) → None
Calls

PATCH /teams/{id}

get_teams() → PaginatedList[Team]
Calls

GET /teams/{id}/teams

get_discussions() → PaginatedList[TeamDiscussion]
Calls

GET /teams/{id}/discussions

get_members(role: Opt[str] = NotSet) → PaginatedList[NamedUser]
Calls

GET /teams/{id}/members

get_repos() → PaginatedList[Repository]
Calls

GET /teams/{id}/repos

invitations() → PaginatedList[NamedUser]
Calls

GET /teams/{id}/invitations

has_in_members(member: NamedUser) → bool
Calls

GET /teams/{id}/members/{user}

has_in_repos(repo: Repository) → bool
Calls

GET /teams/{id}/repos/{owner}/{repo}

remove_membership(member: NamedUser) → None
Calls

DELETE /teams/{team_id}/memberships/{username}

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

Calls

DELETE /teams/{id}/members/{user}

remove_from_repos(repo: Repository) → None
Calls

DELETE /teams/{id}/repos/{owner}/{repo}