labels
Accessed as client.repos.issues.labels; the async client mirrors it.
ReposIssuesLabels
The repos.issues.labels namespace.
add
add(
owner: str, repo: str, index: int, *, labels: list[object] | None = None, updated_at: datetime | None = None
) -> list[Label]
Add a label to an issue.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
labels
|
list[object] | None
|
Labels can be a list of integers representing label IDs or a list of strings representing label names |
None
|
updated_at
|
datetime | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
list[Label]
|
LabelListWithoutPagination - Labels for a specific issue (no pagination headers). |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: issueAddLabel
clear
clear(owner: str, repo: str, index: int, *, updated_at: datetime | None = None) -> None
Remove all labels from an issue.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
updated_at
|
datetime | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: issueClearLabels
delete
delete(owner: str, repo: str, index: int, identifier: str, *, updated_at: datetime | None = None) -> None
Remove a label from an issue.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
identifier
|
str
|
name or id of the label to remove |
required |
updated_at
|
datetime | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
UnprocessableEntityError
|
|
Operation ID: issueRemoveLabel
list
list(owner: str, repo: str, index: int) -> list[Label]
Get an issue's labels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
Returns:
| Type | Description |
|---|---|
list[Label]
|
LabelListWithoutPagination - Labels for a specific issue (no pagination headers). |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: issueGetLabels
update
update(
owner: str, repo: str, index: int, *, labels: list[object] | None = None, updated_at: datetime | None = None
) -> list[Label]
Replace an issue's labels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
labels
|
list[object] | None
|
Labels can be a list of integers representing label IDs or a list of strings representing label names |
None
|
updated_at
|
datetime | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
list[Label]
|
LabelListWithoutPagination - Labels for a specific issue (no pagination headers). |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: issueReplaceLabels
AsyncReposIssuesLabels
The repos.issues.labels namespace.
add
add(
owner: str, repo: str, index: int, *, labels: list[object] | None = None, updated_at: datetime | None = None
) -> list[Label]
Add a label to an issue.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
labels
|
list[object] | None
|
Labels can be a list of integers representing label IDs or a list of strings representing label names |
None
|
updated_at
|
datetime | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
list[Label]
|
LabelListWithoutPagination - Labels for a specific issue (no pagination headers). |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: issueAddLabel
clear
clear(owner: str, repo: str, index: int, *, updated_at: datetime | None = None) -> None
Remove all labels from an issue.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
updated_at
|
datetime | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: issueClearLabels
delete
delete(owner: str, repo: str, index: int, identifier: str, *, updated_at: datetime | None = None) -> None
Remove a label from an issue.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
identifier
|
str
|
name or id of the label to remove |
required |
updated_at
|
datetime | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
UnprocessableEntityError
|
|
Operation ID: issueRemoveLabel
list
list(owner: str, repo: str, index: int) -> list[Label]
Get an issue's labels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
Returns:
| Type | Description |
|---|---|
list[Label]
|
LabelListWithoutPagination - Labels for a specific issue (no pagination headers). |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: issueGetLabels
update
update(
owner: str, repo: str, index: int, *, labels: list[object] | None = None, updated_at: datetime | None = None
) -> list[Label]
Replace an issue's labels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
index
|
int
|
index of the issue |
required |
labels
|
list[object] | None
|
Labels can be a list of integers representing label IDs or a list of strings representing label names |
None
|
updated_at
|
datetime | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
list[Label]
|
LabelListWithoutPagination - Labels for a specific issue (no pagination headers). |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
Operation ID: issueReplaceLabels