Skip to content

teams

Accessed as client.repos.teams; the async client mirrors it.

ReposTeams

The repos.teams namespace.

add

add(owner: str, repo: str, team: str) -> None

Add a team to a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
team str

team name

required

Returns:

Type Description
None

No content.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
MethodNotAllowedError
  1. APIError is error format response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: repoAddTeam

get

get(owner: str, repo: str, team: str) -> Team

Check if a team is assigned to a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
team str

team name

required

Returns:

Type Description
Team

Team.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
MethodNotAllowedError
  1. APIError is error format response.

Operation ID: repoCheckTeam

list

list(owner: str, repo: str) -> list[Team]

List a repository's teams.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required

Returns:

Type Description
list[Team]

TeamListWithoutPagination - Teams without pagination headers.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
MethodNotAllowedError
  1. APIError is error format response.

Operation ID: repoListTeams

remove

remove(owner: str, repo: str, team: str) -> None

Delete a team from a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
team str

team name

required

Returns:

Type Description
None

No content.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
MethodNotAllowedError
  1. APIError is error format response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: repoDeleteTeam

AsyncReposTeams

The repos.teams namespace.

add

add(owner: str, repo: str, team: str) -> None

Add a team to a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
team str

team name

required

Returns:

Type Description
None

No content.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
MethodNotAllowedError
  1. APIError is error format response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: repoAddTeam

get

get(owner: str, repo: str, team: str) -> Team

Check if a team is assigned to a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
team str

team name

required

Returns:

Type Description
Team

Team.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
MethodNotAllowedError
  1. APIError is error format response.

Operation ID: repoCheckTeam

list

list(owner: str, repo: str) -> list[Team]

List a repository's teams.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required

Returns:

Type Description
list[Team]

TeamListWithoutPagination - Teams without pagination headers.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
MethodNotAllowedError
  1. APIError is error format response.

Operation ID: repoListTeams

remove

remove(owner: str, repo: str, team: str) -> None

Delete a team from a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
team str

team name

required

Returns:

Type Description
None

No content.

Raises:

Type Description
NotFoundError
  1. APINotFound is a not found error response.
MethodNotAllowedError
  1. APIError is error format response.
UnprocessableEntityError
  1. APIValidationError is error format response related to input validation.

Operation ID: repoDeleteTeam