Skip to content

repos

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

TeamsRepos

The teams.repos namespace.

add

add(id: int, org: str, repo: str) -> None

Add a repository to a team.

Parameters:

Name Type Description Default
id int

id of the team

required
org str

organization that owns the repo to add

required
repo str

name of the repo to add

required

Returns:

Type Description
None

No content.

Raises:

Type Description
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: orgAddTeamRepository

get

get(id: int, org: str, repo: str) -> Repository

List a particular repo of team.

Parameters:

Name Type Description Default
id int

id of the team

required
org str

organization that owns the repo to list

required
repo str

name of the repo to list

required

Returns:

Type Description
Repository

Repository.

Raises:

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

Operation ID: orgListTeamRepo

list

list(id: int, *, page: int | None = None, limit: int | None = None) -> Paginated[Repository]

List a team's repos.

Parameters:

Name Type Description Default
id int

id of the team

required
page int | None

1-based page to start iteration at.

None
limit int | None

Page size; the instance caps it server-side.

None

Returns:

Type Description
Paginated[Repository]

RepositoryList.

Raises:

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

Operation ID: orgListTeamRepos

remove

remove(id: int, org: str, repo: str) -> None

Remove a repository from a team.

This does not delete the repository, it only removes the repository from the team.

Parameters:

Name Type Description Default
id int

id of the team

required
org str

organization that owns the repo to remove

required
repo str

name of the repo to remove

required

Returns:

Type Description
None

No content.

Raises:

Type Description
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: orgRemoveTeamRepository

AsyncTeamsRepos

The teams.repos namespace.

add

add(id: int, org: str, repo: str) -> None

Add a repository to a team.

Parameters:

Name Type Description Default
id int

id of the team

required
org str

organization that owns the repo to add

required
repo str

name of the repo to add

required

Returns:

Type Description
None

No content.

Raises:

Type Description
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: orgAddTeamRepository

get

get(id: int, org: str, repo: str) -> Repository

List a particular repo of team.

Parameters:

Name Type Description Default
id int

id of the team

required
org str

organization that owns the repo to list

required
repo str

name of the repo to list

required

Returns:

Type Description
Repository

Repository.

Raises:

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

Operation ID: orgListTeamRepo

list

list(id: int, *, page: int | None = None, limit: int | None = None) -> AsyncPaginated[Repository]

List a team's repos.

Parameters:

Name Type Description Default
id int

id of the team

required
page int | None

1-based page to start iteration at.

None
limit int | None

Page size; the instance caps it server-side.

None

Returns:

Type Description
AsyncPaginated[Repository]

RepositoryList.

Raises:

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

Operation ID: orgListTeamRepos

remove

remove(id: int, org: str, repo: str) -> None

Remove a repository from a team.

This does not delete the repository, it only removes the repository from the team.

Parameters:

Name Type Description Default
id int

id of the team

required
org str

organization that owns the repo to remove

required
repo str

name of the repo to remove

required

Returns:

Type Description
None

No content.

Raises:

Type Description
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.

Operation ID: orgRemoveTeamRepository