commits
Accessed as client.repos.commits; the async client mirrors it.
ReposCommits
The repos.commits namespace.
list
list(
owner: str,
repo: str,
*,
sha: str | None = None,
path: str | None = None,
stat: bool | None = None,
verification: bool | None = None,
files: bool | None = None,
not_: str | None = None,
page: int | None = None,
limit: int | None = None,
) -> Paginated[Commit]
Get a list of all commits from a repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
sha
|
str | None
|
SHA or branch to start listing commits from (usually 'master') |
None
|
path
|
str | None
|
filepath of a file/dir |
None
|
stat
|
bool | None
|
include diff stats for every commit (disable for speedup, default 'true') |
None
|
verification
|
bool | None
|
include verification for every commit (disable for speedup, default 'true') |
None
|
files
|
bool | None
|
include a list of affected files for every commit (disable for speedup, default 'true') |
None
|
not_
|
str | None
|
commits that match the given specifier will not be listed. |
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[Commit]
|
CommitList. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
ConflictError
|
|
Operation ID: repoGetAllCommits
pull_request
pull_request(owner: str, repo: str, sha: str) -> PullRequest
Get the pull request of the commit.
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 to get |
required |
Returns:
| Type | Description |
|---|---|
PullRequest
|
PullRequest. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: repoGetCommitPullRequest
status
status(owner: str, repo: str, ref: str, *, page: int | None = None, limit: int | None = None) -> CombinedStatus
Get a commit's combined status, by branch/tag/commit reference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
ref
|
str
|
name of branch/tag/commit |
required |
page
|
int | None
|
page number of results to return (1-based) |
None
|
limit
|
int | None
|
page size of results |
None
|
Returns:
| Type | Description |
|---|---|
CombinedStatus
|
CombinedStatus. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
NotFoundError
|
|
Operation ID: repoGetCombinedStatusByRef
statuses
statuses(
owner: str,
repo: str,
ref: 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, by branch/tag/commit reference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
ref
|
str
|
name of branch/tag/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
|
|
NotFoundError
|
|
Operation ID: repoListStatusesByRef
AsyncReposCommits
The repos.commits namespace.
list
list(
owner: str,
repo: str,
*,
sha: str | None = None,
path: str | None = None,
stat: bool | None = None,
verification: bool | None = None,
files: bool | None = None,
not_: str | None = None,
page: int | None = None,
limit: int | None = None,
) -> AsyncPaginated[Commit]
Get a list of all commits from a repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
sha
|
str | None
|
SHA or branch to start listing commits from (usually 'master') |
None
|
path
|
str | None
|
filepath of a file/dir |
None
|
stat
|
bool | None
|
include diff stats for every commit (disable for speedup, default 'true') |
None
|
verification
|
bool | None
|
include verification for every commit (disable for speedup, default 'true') |
None
|
files
|
bool | None
|
include a list of affected files for every commit (disable for speedup, default 'true') |
None
|
not_
|
str | None
|
commits that match the given specifier will not be listed. |
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[Commit]
|
CommitList. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
ConflictError
|
|
Operation ID: repoGetAllCommits
pull_request
pull_request(owner: str, repo: str, sha: str) -> PullRequest
Get the pull request of the commit.
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 to get |
required |
Returns:
| Type | Description |
|---|---|
PullRequest
|
PullRequest. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: repoGetCommitPullRequest
status
status(owner: str, repo: str, ref: str, *, page: int | None = None, limit: int | None = None) -> CombinedStatus
Get a commit's combined status, by branch/tag/commit reference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
ref
|
str
|
name of branch/tag/commit |
required |
page
|
int | None
|
page number of results to return (1-based) |
None
|
limit
|
int | None
|
page size of results |
None
|
Returns:
| Type | Description |
|---|---|
CombinedStatus
|
CombinedStatus. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
NotFoundError
|
|
Operation ID: repoGetCombinedStatusByRef
statuses
statuses(
owner: str,
repo: str,
ref: 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, by branch/tag/commit reference.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
ref
|
str
|
name of branch/tag/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
|
|
NotFoundError
|
|
Operation ID: repoListStatusesByRef