Skip to content

statuses

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

ReposStatuses

The repos.statuses namespace.

create

create(
    owner: str,
    repo: str,
    sha: str,
    *,
    context: str | None = None,
    description: str | None = None,
    state: str | None = None,
    target_url: str | None = None,
) -> CommitStatus

Create a commit status.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
sha str

sha of the commit

required
context str | None
None
description str | None
None
state str | None
None
target_url str | None
None

Returns:

Type Description
CommitStatus

CommitStatus.

Raises:

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

Operation ID: repoCreateStatus

list

list(
    owner: str,
    repo: str,
    sha: str,
    *,
    sort: Literal["oldest", "recentupdate", "leastupdate", "leastindex", "highestindex"] | None = None,
    state: Literal["pending", "success", "error", "failure", "warning"] | None = None,
    page: int | None = None,
    limit: int | None = None,
) -> Paginated[CommitStatus]

Get a commit's statuses.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
sha str

sha of the commit

required
sort Literal['oldest', 'recentupdate', 'leastupdate', 'leastindex', 'highestindex'] | None

type of sort

None
state Literal['pending', 'success', 'error', 'failure', 'warning'] | None

type of state

None
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[CommitStatus]

CommitStatusList.

Raises:

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

Operation ID: repoListStatuses

AsyncReposStatuses

The repos.statuses namespace.

create

create(
    owner: str,
    repo: str,
    sha: str,
    *,
    context: str | None = None,
    description: str | None = None,
    state: str | None = None,
    target_url: str | None = None,
) -> CommitStatus

Create a commit status.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
sha str

sha of the commit

required
context str | None
None
description str | None
None
state str | None
None
target_url str | None
None

Returns:

Type Description
CommitStatus

CommitStatus.

Raises:

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

Operation ID: repoCreateStatus

list

list(
    owner: str,
    repo: str,
    sha: str,
    *,
    sort: Literal["oldest", "recentupdate", "leastupdate", "leastindex", "highestindex"] | None = None,
    state: Literal["pending", "success", "error", "failure", "warning"] | None = None,
    page: int | None = None,
    limit: int | None = None,
) -> AsyncPaginated[CommitStatus]

Get a commit's statuses.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
sha str

sha of the commit

required
sort Literal['oldest', 'recentupdate', 'leastupdate', 'leastindex', 'highestindex'] | None

type of sort

None
state Literal['pending', 'success', 'error', 'failure', 'warning'] | None

type of state

None
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[CommitStatus]

CommitStatusList.

Raises:

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

Operation ID: repoListStatuses