trees
Accessed as client.repos.git.trees; the async client mirrors it.
ReposGitTrees
The repos.git.trees namespace.
get
get(
owner: str,
repo: str,
sha: str,
*,
recursive: bool | None = None,
page: int | None = None,
per_page: int | None = None,
) -> GitTreeResponse
Gets the tree of a repository.
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 |
recursive
|
bool | None
|
show all directories and files |
None
|
page
|
int | None
|
page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page |
None
|
per_page
|
int | None
|
number of items per page |
None
|
Returns:
| Type | Description |
|---|---|
GitTreeResponse
|
GitTreeResponse. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
NotFoundError
|
|
Operation ID: GetTree
AsyncReposGitTrees
The repos.git.trees namespace.
get
get(
owner: str,
repo: str,
sha: str,
*,
recursive: bool | None = None,
page: int | None = None,
per_page: int | None = None,
) -> GitTreeResponse
Gets the tree of a repository.
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 |
recursive
|
bool | None
|
show all directories and files |
None
|
page
|
int | None
|
page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page |
None
|
per_page
|
int | None
|
number of items per page |
None
|
Returns:
| Type | Description |
|---|---|
GitTreeResponse
|
GitTreeResponse. |
Raises:
| Type | Description |
|---|---|
BadRequestError
|
|
NotFoundError
|
|
Operation ID: GetTree