Skip to content

flags

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

ReposFlags

The repos.flags namespace.

add

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

Add a flag to a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
flag str

name of the flag

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: repoAddFlag

delete_all

delete_all(owner: str, repo: str) -> None

Remove all flags from a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

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: repoDeleteAllFlags

get

get(owner: str, repo: str, flag: str) -> None

Check if a repository has a given flag.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
flag str

name of the flag

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: repoCheckFlag

list

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

List a repository's flags.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required

Returns:

Type Description
list[str]

StringSlice.

Raises:

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

Operation ID: repoListFlags

remove

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

Remove a flag from a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
flag str

name of the flag

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: repoDeleteFlag

update

update(owner: str, repo: str, *, flags: list[str] | None = None) -> None

Replace all flags of a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
flags list[str] | None
None

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: repoReplaceAllFlags

AsyncReposFlags

The repos.flags namespace.

add

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

Add a flag to a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
flag str

name of the flag

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: repoAddFlag

delete_all

delete_all(owner: str, repo: str) -> None

Remove all flags from a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

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: repoDeleteAllFlags

get

get(owner: str, repo: str, flag: str) -> None

Check if a repository has a given flag.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
flag str

name of the flag

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: repoCheckFlag

list

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

List a repository's flags.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required

Returns:

Type Description
list[str]

StringSlice.

Raises:

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

Operation ID: repoListFlags

remove

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

Remove a flag from a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
flag str

name of the flag

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: repoDeleteFlag

update

update(owner: str, repo: str, *, flags: list[str] | None = None) -> None

Replace all flags of a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
flags list[str] | None
None

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: repoReplaceAllFlags