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
idinteger (int64)Unique identifier of the repository
namestringThe name of the repository. (example: Team Environment)
node_idstring (example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5)
full_namestring (example: octocat/Hello-World)
allow_auto_mergebooleanWhether to allow Auto-merge to be used on pull requests.
allow_forkingbooleanWhether to allow forking this repo
allow_merge_commitbooleanWhether to allow merge commits for pull requests.
allow_rebase_mergebooleanWhether to allow rebase merges for pull requests.
allow_squash_mergebooleanWhether to allow squash merges for pull requests.
allow_update_branchbooleanWhether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging.
anonymous_access_enabledbooleanWhether anonymous git access is enabled for this repository
archive_urlstring (example: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref})
archivedbooleanWhether the repository is archived.
assignees_urlstring (example: http://api.github.com/repos/octocat/Hello-World/assignees{/user})
blobs_urlstring (example: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha})
branches_urlstring (example: http://api.github.com/repos/octocat/Hello-World/branches{/branch})
clone_urlstring (example: https://github.com/octocat/Hello-World.git)
code_search_index_statusobjectThe status of the code search index for this repository
collaborators_urlstring (example: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator})
comments_urlstring (example: http://api.github.com/repos/octocat/Hello-World/comments{/number})
commits_urlstring (example: http://api.github.com/repos/octocat/Hello-World/commits{/sha})
compare_urlstring (example: http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head})
contents_urlstring (example: http://api.github.com/repos/octocat/Hello-World/contents/{+path})
contributors_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/contributors)
created_atstring (date-time) (example: 2011-01-26T19:01:12Z)
default_branchstringThe default branch of the repository. (example: master)
delete_branch_on_mergebooleanWhether to delete head branches when pull requests are merged
deployments_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/deployments)
descriptionstring (example: This your first repo!)
disabledbooleanReturns whether or not this repository disabled.
downloads_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/downloads)
events_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/events)
forkboolean
forksinteger
forks_countinteger
forks_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/forks)
git_commits_urlstring (example: http://api.github.com/repos/octocat/Hello-World/git/commits{/sha})
git_refs_urlstring (example: http://api.github.com/repos/octocat/Hello-World/git/refs{/sha})
git_tags_urlstring (example: http://api.github.com/repos/octocat/Hello-World/git/tags{/sha})
git_urlstring (example: git:github.com/octocat/Hello-World.git)
has_discussionsbooleanWhether discussions are enabled.
has_downloadsbooleanWhether downloads are enabled.
has_issuesbooleanWhether issues are enabled.
has_pagesboolean
has_projectsbooleanWhether projects are enabled.
has_pull_requestsbooleanWhether pull requests are enabled.
has_wikibooleanWhether the wiki is enabled.
homepagestring (uri) (example: https://github.com)
hooks_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/hooks)
html_urlstring (uri) (example: https://github.com/octocat/Hello-World)
is_templatebooleanWhether this repository acts as a template that can be used to generate new repositories.
issue_comment_urlstring (example: http://api.github.com/repos/octocat/Hello-World/issues/comments{/number})
issue_events_urlstring (example: http://api.github.com/repos/octocat/Hello-World/issues/events{/number})
issues_urlstring (example: http://api.github.com/repos/octocat/Hello-World/issues{/number})
keys_urlstring (example: http://api.github.com/repos/octocat/Hello-World/keys{/key_id})
labels_urlstring (example: http://api.github.com/repos/octocat/Hello-World/labels{/name})
languagestring
languages_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/languages)
licenseobjectLicense Simple (title: License Simple)
master_branchstring
merge_commit_messagestringThe default value for a merge commit message. - PR_TITLE - default to the pull request's title. - PR_BODY - default to the pull request's body. - BLANK - default to a blank commit message. (PR_BODY, PR_TITLE, BLANK)
merge_commit_titlestringThe default value for a merge commit title. - PR_TITLE - default to the pull request's title. - MERGE_MESSAGE - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). (PR_TITLE, MERGE_MESSAGE)
merges_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/merges)
milestones_urlstring (example: http://api.github.com/repos/octocat/Hello-World/milestones{/number})
mirror_urlstring (uri) (example: git:git.example.com/octocat/Hello-World)
notifications_urlstring (example: http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating})
open_issuesinteger
open_issues_countinteger
ownerobjectA GitHub user. (title: Simple User)
permissionsobject
privatebooleanWhether the repository is private or public.
pull_request_creation_policystringThe policy controlling who can create pull requests: all or collaborators_only. (all, collaborators_only) (example: all)
pulls_urlstring (example: http://api.github.com/repos/octocat/Hello-World/pulls{/number})
pushed_atstring (date-time) (example: 2011-01-26T19:06:43Z)
releases_urlstring (example: http://api.github.com/repos/octocat/Hello-World/releases{/id})
sizeintegerThe size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.
squash_merge_commit_messagestringThe default value for a squash merge commit message: - PR_BODY - default to the pull request's body. - COMMIT_MESSAGES - default to the branch's commit messages. - BLANK - default to a blank commit message. (PR_BODY, COMMIT_MESSAGES, BLANK)
squash_merge_commit_titlestringThe default value for a squash merge commit title: - PR_TITLE - default to the pull request's title. - COMMIT_OR_PR_TITLE - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). (PR_TITLE, COMMIT_OR_PR_TITLE)
ssh_urlstring (example: git@github.com:octocat/Hello-World.git)
stargazers_countinteger
stargazers_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/stargazers)
starred_atstring (example: "2020-07-09T00:17:42Z")
statuses_urlstring (example: http://api.github.com/repos/octocat/Hello-World/statuses/{sha})
subscribers_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/subscribers)
subscription_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/subscription)
svn_urlstring (uri) (example: https://svn.github.com/octocat/Hello-World)
tags_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/tags)
teams_urlstring (uri) (example: http://api.github.com/repos/octocat/Hello-World/teams)
temp_clone_tokenstring
topicsarray
trees_urlstring (example: http://api.github.com/repos/octocat/Hello-World/git/trees{/sha})
updated_atstring (date-time) (example: 2011-01-26T19:14:43Z)
urlstring (uri) (example: https://api.github.com/repos/octocat/Hello-World)
use_squash_pr_title_as_defaultbooleanWhether a squash merge commit can use the pull request title as default. **This property is closing down. Please use squash_merge_commit_title instead.
visibilitystringThe repository visibility: public, private, or internal. (default: public)
watchersinteger
watchers_countinteger
web_commit_signoff_requiredbooleanWhether to require contributors to sign off on web-based commits

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
id,
name,
node_id,
full_name,
allow_auto_merge,
allow_forking,
allow_merge_commit,
allow_rebase_merge,
allow_squash_merge,
allow_update_branch,
anonymous_access_enabled,
archive_url,
archived,
assignees_url,
blobs_url,
branches_url,
clone_url,
code_search_index_status,
collaborators_url,
comments_url,
commits_url,
compare_url,
contents_url,
contributors_url,
created_at,
default_branch,
delete_branch_on_merge,
deployments_url,
description,
disabled,
downloads_url,
events_url,
fork,
forks,
forks_count,
forks_url,
git_commits_url,
git_refs_url,
git_tags_url,
git_url,
has_discussions,
has_downloads,
has_issues,
has_pages,
has_projects,
has_pull_requests,
has_wiki,
homepage,
hooks_url,
html_url,
is_template,
issue_comment_url,
issue_events_url,
issues_url,
keys_url,
labels_url,
language,
languages_url,
license,
master_branch,
merge_commit_message,
merge_commit_title,
merges_url,
milestones_url,
mirror_url,
notifications_url,
open_issues,
open_issues_count,
owner,
permissions,
private,
pull_request_creation_policy,
pulls_url,
pushed_at,
releases_url,
size,
squash_merge_commit_message,
squash_merge_commit_title,
ssh_url,
stargazers_count,
stargazers_url,
starred_at,
statuses_url,
subscribers_url,
subscription_url,
svn_url,
tags_url,
teams_url,
temp_clone_token,
topics,
trees_url,
updated_at,
url,
use_squash_pr_title_as_default,
visibility,
watchers,
watchers_count,
web_commit_signoff_required
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
;