runner_labels
Creates, updates, deletes, gets or lists a runner_labels resource.
Overview
| Name | runner_labels |
| Type | Resource |
| Id | github.actions.runner_labels |
Fields
The following fields are returned by SELECT queries:
- list_labels_for_self_hosted_runner_for_repo
- list_labels_for_self_hosted_runner_for_org
Response
| Name | Datatype | Description |
|---|---|---|
labels | array | |
total_count | integer |
Response
| Name | Datatype | Description |
|---|---|---|
labels | array | |
total_count | integer |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_labels_for_self_hosted_runner_for_repo | select | owner, repo, runner_id | Lists all labels for a self-hosted runner configured in a repository. Authenticated users must have admin access to the repository to use this endpoint. OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint. | |
list_labels_for_self_hosted_runner_for_org | select | org, runner_id | Lists all labels for a self-hosted runner configured in an organization. Authenticated users must have admin access to the organization to use this endpoint. OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. If the repository is private, the repo scope is also required. | |
add_custom_labels_to_self_hosted_runner_for_repo | insert | owner, repo, runner_id, labels | Adds custom labels to a self-hosted runner configured in a repository. Authenticated users must have admin access to the organization to use this endpoint. OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint. | |
add_custom_labels_to_self_hosted_runner_for_org | insert | org, runner_id, labels | Adds custom labels to a self-hosted runner configured in an organization. Authenticated users must have admin access to the organization to use this endpoint. OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. | |
set_custom_labels_for_self_hosted_runner_for_repo | replace | owner, repo, runner_id, labels | Remove all previous custom labels and set the new custom labels for a specific self-hosted runner configured in a repository. Authenticated users must have admin access to the repository to use this endpoint. OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint. | |
set_custom_labels_for_self_hosted_runner_for_org | replace | org, runner_id, labels | Remove all previous custom labels and set the new custom labels for a specific self-hosted runner configured in an organization. Authenticated users must have admin access to the organization to use this endpoint. OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. If the repository is private, the repo scope is also required. | |
remove_custom_label_from_self_hosted_runner_for_repo | delete | owner, repo, runner_id, name | Remove a custom label from a self-hosted runner configured in a repository. Returns the remaining labels from the runner. This endpoint returns a 404 Not Found status if the custom label is notpresent on the runner. Authenticated users must have admin access to the repository to use this endpoint. OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint. | |
remove_custom_label_from_self_hosted_runner_for_org | delete | org, runner_id, name | Remove a custom label from a self-hosted runner configured in an organization. Returns the remaining labels from the runner. This endpoint returns a 404 Not Found status if the custom label is notpresent on the runner. Authenticated users must have admin access to the organization to use this endpoint. OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. If the repository is private, the repo scope is also required. | |
remove_all_custom_labels_from_self_hosted_runner_for_repo | delete | owner, repo, runner_id | Remove all custom labels from a self-hosted runner configured in a repository. Returns the remaining read-only labels from the runner. Authenticated users must have admin access to the repository to use this endpoint. OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint. | |
remove_all_custom_labels_from_self_hosted_runner_for_org | delete | org, runner_id | Remove all custom labels from a self-hosted runner configured in an organization. Returns the remaining read-only labels from the runner. Authenticated users must have admin access to the organization to use this endpoint. OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. If the repository is private, the repo scope is also required. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
name | string | The name of a self-hosted runner's custom label. |
org | string | The organization name. The name is not case sensitive. |
owner | string | The account owner of the repository. The name is not case sensitive. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
runner_id | integer | Unique identifier of the self-hosted runner. |
SELECT examples
- list_labels_for_self_hosted_runner_for_repo
- list_labels_for_self_hosted_runner_for_org
Lists all labels for a self-hosted runner configured in a repository.
Authenticated users must have admin access to the repository to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
SELECT
labels,
total_count
FROM github.actions.runner_labels
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND runner_id = '{{ runner_id }}' -- required
;
Lists all labels for a self-hosted runner configured in an organization.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. If the repository is private, the repo scope is also required.
SELECT
labels,
total_count
FROM github.actions.runner_labels
WHERE org = '{{ org }}' -- required
AND runner_id = '{{ runner_id }}' -- required
;
INSERT examples
- add_custom_labels_to_self_hosted_runner_for_repo
- add_custom_labels_to_self_hosted_runner_for_org
- Manifest
Adds custom labels to a self-hosted runner configured in a repository.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.
INSERT INTO github.actions.runner_labels (
labels,
owner,
repo,
runner_id
)
SELECT
'{{ labels }}' /* required */,
'{{ owner }}',
'{{ repo }}',
'{{ runner_id }}'
RETURNING
labels,
total_count
;
Adds custom labels to a self-hosted runner configured in an organization.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
INSERT INTO github.actions.runner_labels (
labels,
org,
runner_id
)
SELECT
'{{ labels }}' /* required */,
'{{ org }}',
'{{ runner_id }}'
RETURNING
labels,
total_count
;
# Description fields are for documentation purposes
- name: runner_labels
props:
- name: owner
value: "{{ owner }}"
description: Required parameter for the runner_labels resource.
- name: repo
value: "{{ repo }}"
description: Required parameter for the runner_labels resource.
- name: runner_id
value: {{ runner_id }}
description: Required parameter for the runner_labels resource.
- name: org
value: "{{ org }}"
description: Required parameter for the runner_labels resource.
- name: labels
value:
- "{{ labels }}"
description: |
The names of the custom labels to add to the runner.
REPLACE examples
- set_custom_labels_for_self_hosted_runner_for_repo
- set_custom_labels_for_self_hosted_runner_for_org
Remove all previous custom labels and set the new custom labels for a specific
self-hosted runner configured in a repository.
Authenticated users must have admin access to the repository to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
REPLACE github.actions.runner_labels
SET
labels = '{{ labels }}'
WHERE
owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required
AND runner_id = '{{ runner_id }}' --required
AND labels = '{{ labels }}' --required
RETURNING
labels,
total_count;
Remove all previous custom labels and set the new custom labels for a specific
self-hosted runner configured in an organization.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. If the repository is private, the repo scope is also required.
REPLACE github.actions.runner_labels
SET
labels = '{{ labels }}'
WHERE
org = '{{ org }}' --required
AND runner_id = '{{ runner_id }}' --required
AND labels = '{{ labels }}' --required
RETURNING
labels,
total_count;
DELETE examples
- remove_custom_label_from_self_hosted_runner_for_repo
- remove_custom_label_from_self_hosted_runner_for_org
- remove_all_custom_labels_from_self_hosted_runner_for_repo
- remove_all_custom_labels_from_self_hosted_runner_for_org
Remove a custom label from a self-hosted runner configured
in a repository. Returns the remaining labels from the runner.
This endpoint returns a 404 Not Found status if the custom label is not
present on the runner.
Authenticated users must have admin access to the repository to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
DELETE FROM github.actions.runner_labels
WHERE owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required
AND runner_id = '{{ runner_id }}' --required
AND name = '{{ name }}' --required
;
Remove a custom label from a self-hosted runner configured
in an organization. Returns the remaining labels from the runner.
This endpoint returns a 404 Not Found status if the custom label is not
present on the runner.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. If the repository is private, the repo scope is also required.
DELETE FROM github.actions.runner_labels
WHERE org = '{{ org }}' --required
AND runner_id = '{{ runner_id }}' --required
AND name = '{{ name }}' --required
;
Remove all custom labels from a self-hosted runner configured in a
repository. Returns the remaining read-only labels from the runner.
Authenticated users must have admin access to the repository to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
DELETE FROM github.actions.runner_labels
WHERE owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required
AND runner_id = '{{ runner_id }}' --required
;
Remove all custom labels from a self-hosted runner configured in an
organization. Returns the remaining read-only labels from the runner.
Authenticated users must have admin access to the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint. If the repository is private, the repo scope is also required.
DELETE FROM github.actions.runner_labels
WHERE org = '{{ org }}' --required
AND runner_id = '{{ runner_id }}' --required
;