Skip to content

refs

Accessed as client.repos.git.refs; the async client mirrors it.

ReposGitRefs

The repos.git.refs namespace.

get

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

Get specified ref or filtered repository's refs.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
ref str

part or full name of the ref

required

Returns:

Type Description
list[Reference]

ReferenceList.

Raises:

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

Operation ID: repoListGitRefs

list

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

Get specified ref or filtered repository's refs.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required

Returns:

Type Description
list[Reference]

ReferenceList.

Raises:

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

Operation ID: repoListAllGitRefs

AsyncReposGitRefs

The repos.git.refs namespace.

get

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

Get specified ref or filtered repository's refs.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required
ref str

part or full name of the ref

required

Returns:

Type Description
list[Reference]

ReferenceList.

Raises:

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

Operation ID: repoListGitRefs

list

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

Get specified ref or filtered repository's refs.

Parameters:

Name Type Description Default
owner str

owner of the repo

required
repo str

name of the repo

required

Returns:

Type Description
list[Reference]

ReferenceList.

Raises:

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

Operation ID: repoListAllGitRefs