Skip to main content

org_runner_group_repos

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

Overview

Nameorg_runner_group_repos
TypeResource
Idgithub.actions.org_runner_group_repos

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
repositoriesarray
total_countnumber

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_repo_access_to_self_hosted_runner_group_in_orgselectorg, runner_group_idpage, per_pageLists the repositories with access to a self-hosted runner group configured in an organization.

OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
add_repo_access_to_self_hosted_runner_group_in_orgreplaceorg, runner_group_id, repository_idAdds a repository to the list of repositories that can access a self-hosted runner group. The runner group must have visibility set to selected. For more information, see "Create a self-hosted runner group for an organization."

OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
set_repo_access_to_self_hosted_runner_group_in_orgreplaceorg, runner_group_id, selected_repository_idsReplaces the list of repositories that have access to a self-hosted runner group configured in an organization.

OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
remove_repo_access_to_self_hosted_runner_group_in_orgdeleteorg, runner_group_id, repository_idRemoves a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have visibility set to selected. For more information, see "Create a self-hosted runner group for an organization."

OAuth app tokens and personal access tokens (classic) need the admin:org scope 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.
runner_group_idintegerUnique identifier of the self-hosted runner group.
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 the repositories with access to a self-hosted runner group configured in an organization.

OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

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

REPLACE examples

Adds a repository to the list of repositories that can access a self-hosted runner group. The runner group must have visibility set to selected. For more information, see "Create a self-hosted runner group for an organization."

OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

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

DELETE examples

Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have visibility set to selected. For more information, see "Create a self-hosted runner group for an organization."

OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

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