Skip to main content

org_self_hosted_runner_repo_access

Creates, updates, deletes, gets or lists an org_self_hosted_runner_repo_access resource.

Overview

Nameorg_self_hosted_runner_repo_access
TypeResource
Idgithub.actions.org_self_hosted_runner_repo_access

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
repositoriesarray
total_countinteger

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_selected_repositories_self_hosted_runners_organizationselectorgper_page, pageLists repositories that are allowed to use self-hosted runners in an organization.

OAuth app tokens and personal access tokens (classic) need the admin:org scope or the "Actions policies" fine-grained permission to use this endpoint.
enable_selected_repository_self_hosted_runners_organizationreplaceorg, repository_idAdds a repository to the list of repositories that are allowed to use self-hosted runners in an organization.

OAuth app tokens and personal access tokens (classic) need the admin:org scope or the "Actions policies" fine-grained permission to use this endpoint.
set_selected_repositories_self_hosted_runners_organizationreplaceorg, selected_repository_idsSets repositories that are allowed to use self-hosted runners in an organization.

OAuth app tokens and personal access tokens (classic) need the admin:org scope or the "Actions policies" fine-grained permission to use this endpoint.
disable_selected_repository_self_hosted_runners_organizationdeleteorg, repository_idRemoves a repository from the list of repositories that are allowed to use self-hosted runners in an organization.

OAuth app tokens and personal access tokens (classic) need the admin:org scope or the "Actions policies" fine-grained permission to use this endpoint.

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.

NameDatatypeDescription
orgstringThe organization name. The name is not case sensitive.
repository_idintegerThe unique identifier of the repository.
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

Lists repositories that are allowed to use self-hosted runners in an organization.

OAuth app tokens and personal access tokens (classic) need the admin:org scope or the "Actions policies" fine-grained permission to use this endpoint.

SELECT
repositories,
total_count
FROM github.actions.org_self_hosted_runner_repo_access
WHERE org = '{{ org }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;

REPLACE examples

Adds a repository to the list of repositories that are allowed to use self-hosted runners in an organization.

OAuth app tokens and personal access tokens (classic) need the admin:org scope or the "Actions policies" fine-grained permission to use this endpoint.

REPLACE github.actions.org_self_hosted_runner_repo_access
SET
-- No updatable properties
WHERE
org = '{{ org }}' --required
AND repository_id = '{{ repository_id }}' --required;

DELETE examples

Removes a repository from the list of repositories that are allowed to use self-hosted runners in an organization.

OAuth app tokens and personal access tokens (classic) need the admin:org scope or the "Actions policies" fine-grained permission to use this endpoint.

DELETE FROM github.actions.org_self_hosted_runner_repo_access
WHERE org = '{{ org }}' --required
AND repository_id = '{{ repository_id }}' --required
;