Skip to content

push_mirrors

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

ReposPushMirrors

The repos.push_mirrors namespace.

create

create(
    owner: str,
    repo: str,
    *,
    branch_filter: str | None = None,
    interval: str | None = None,
    remote_address: str | None = None,
    remote_password: str | None = None,
    remote_username: str | None = None,
    sync_on_commit: bool | None = None,
    use_ssh: bool | None = None,
) -> PushMirror

Set up a new push mirror in a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
branch_filter str | None
None
interval str | None
None
remote_address str | None
None
remote_password str | None
None
remote_username str | None
None
sync_on_commit bool | None
None
use_ssh bool | None
None

Returns:

Type Description
PushMirror

PushMirror.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.
PayloadTooLargeError
  1. QuotaExceeded.

Operation ID: repoAddPushMirror

delete

delete(owner: str, repo: str, name: str) -> None

Remove a push mirror from a repository by remoteName.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
name str

remote name of the pushMirror

required

Returns:

Type Description
None

No content.

Raises:

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

Operation ID: repoDeletePushMirror

get

get(owner: str, repo: str, name: str) -> PushMirror

Get push mirror of the repository by remoteName.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
name str

remote name of push mirror

required

Returns:

Type Description
PushMirror

PushMirror.

Raises:

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

Operation ID: repoGetPushMirrorByRemoteName

list

list(owner: str, repo: str, *, page: int | None = None, limit: int | None = None) -> Paginated[PushMirror]

Get all push mirrors of the repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

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[PushMirror]

PushMirrorList.

Raises:

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

Operation ID: repoListPushMirrors

AsyncReposPushMirrors

The repos.push_mirrors namespace.

create

create(
    owner: str,
    repo: str,
    *,
    branch_filter: str | None = None,
    interval: str | None = None,
    remote_address: str | None = None,
    remote_password: str | None = None,
    remote_username: str | None = None,
    sync_on_commit: bool | None = None,
    use_ssh: bool | None = None,
) -> PushMirror

Set up a new push mirror in a repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
branch_filter str | None
None
interval str | None
None
remote_address str | None
None
remote_password str | None
None
remote_username str | None
None
sync_on_commit bool | None
None
use_ssh bool | None
None

Returns:

Type Description
PushMirror

PushMirror.

Raises:

Type Description
BadRequestError
  1. APIError is error format response.
ForbiddenError
  1. APIForbiddenError is a forbidden error response.
NotFoundError
  1. APINotFound is a not found error response.
PayloadTooLargeError
  1. QuotaExceeded.

Operation ID: repoAddPushMirror

delete

delete(owner: str, repo: str, name: str) -> None

Remove a push mirror from a repository by remoteName.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
name str

remote name of the pushMirror

required

Returns:

Type Description
None

No content.

Raises:

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

Operation ID: repoDeletePushMirror

get

get(owner: str, repo: str, name: str) -> PushMirror

Get push mirror of the repository by remoteName.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
name str

remote name of push mirror

required

Returns:

Type Description
PushMirror

PushMirror.

Raises:

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

Operation ID: repoGetPushMirrorByRemoteName

list

list(owner: str, repo: str, *, page: int | None = None, limit: int | None = None) -> AsyncPaginated[PushMirror]

Get all push mirrors of the repository.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

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[PushMirror]

PushMirrorList.

Raises:

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

Operation ID: repoListPushMirrors