tag_protections
Accessed as client.repos.tag_protections; the async client mirrors it.
ReposTagProtections
The repos.tag_protections namespace.
create
create(
owner: str,
repo: str,
*,
name_pattern: str | None = None,
whitelist_teams: list[str] | None = None,
whitelist_usernames: list[str] | None = None,
) -> TagProtection
Create a tag protections for a repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
name_pattern
|
str | None
|
|
None
|
whitelist_teams
|
list[str] | None
|
|
None
|
whitelist_usernames
|
list[str] | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
TagProtection
|
TagProtection. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
UnprocessableEntityError
|
|
LockedError
|
|
Operation ID: repoCreateTagProtection
delete
delete(owner: str, repo: str, id: int) -> None
Delete a specific tag protection for the repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of protected tag |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: repoDeleteTagProtection
get
get(owner: str, repo: str, id: int) -> TagProtection
Get a specific tag protection for the repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the tag protect to get |
required |
Returns:
| Type | Description |
|---|---|
TagProtection
|
TagProtection. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: repoGetTagProtection
list
list(owner: str, repo: str) -> list[TagProtection]
List tag protections for a repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
Returns:
| Type | Description |
|---|---|
list[TagProtection]
|
TagProtectionList. |
Operation ID: repoListTagProtection
update
update(
owner: str,
repo: str,
id: int,
*,
name_pattern: str | None = None,
whitelist_teams: list[str] | None = None,
whitelist_usernames: list[str] | None = None,
) -> TagProtection
Edit a tag protections for a repository. Only fields that are set will be changed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of protected tag |
required |
name_pattern
|
str | None
|
|
None
|
whitelist_teams
|
list[str] | None
|
|
None
|
whitelist_usernames
|
list[str] | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
TagProtection
|
TagProtection. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
UnprocessableEntityError
|
|
LockedError
|
|
Operation ID: repoEditTagProtection
AsyncReposTagProtections
The repos.tag_protections namespace.
create
create(
owner: str,
repo: str,
*,
name_pattern: str | None = None,
whitelist_teams: list[str] | None = None,
whitelist_usernames: list[str] | None = None,
) -> TagProtection
Create a tag protections for a repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
name_pattern
|
str | None
|
|
None
|
whitelist_teams
|
list[str] | None
|
|
None
|
whitelist_usernames
|
list[str] | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
TagProtection
|
TagProtection. |
Raises:
| Type | Description |
|---|---|
ForbiddenError
|
|
NotFoundError
|
|
UnprocessableEntityError
|
|
LockedError
|
|
Operation ID: repoCreateTagProtection
delete
delete(owner: str, repo: str, id: int) -> None
Delete a specific tag protection for the repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of protected tag |
required |
Returns:
| Type | Description |
|---|---|
None
|
No content. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: repoDeleteTagProtection
get
get(owner: str, repo: str, id: int) -> TagProtection
Get a specific tag protection for the repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of the tag protect to get |
required |
Returns:
| Type | Description |
|---|---|
TagProtection
|
TagProtection. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
Operation ID: repoGetTagProtection
list
list(owner: str, repo: str) -> list[TagProtection]
List tag protections for a repository.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
Returns:
| Type | Description |
|---|---|
list[TagProtection]
|
TagProtectionList. |
Operation ID: repoListTagProtection
update
update(
owner: str,
repo: str,
id: int,
*,
name_pattern: str | None = None,
whitelist_teams: list[str] | None = None,
whitelist_usernames: list[str] | None = None,
) -> TagProtection
Edit a tag protections for a repository. Only fields that are set will be changed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
owner
|
str
|
owner of the repo |
required |
repo
|
str
|
name of the repo |
required |
id
|
int
|
id of protected tag |
required |
name_pattern
|
str | None
|
|
None
|
whitelist_teams
|
list[str] | None
|
|
None
|
whitelist_usernames
|
list[str] | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
TagProtection
|
TagProtection. |
Raises:
| Type | Description |
|---|---|
NotFoundError
|
|
UnprocessableEntityError
|
|
LockedError
|
|
Operation ID: repoEditTagProtection