Skip to main content

repository_permissions

Overview

Namerepository_permissions
TypeResource
Idgithub.actions.repository_permissions

Fields

NameDatatypeDescription
allowed_actionsstringThe permissions policy that controls the actions that are allowed to run. Can be one of: all, local_only, or selected.
enabledbooleanWhether GitHub Actions is enabled on the repository.
selected_actions_urlstringThe API URL to use to get or set the actions that are allowed to run, when allowed_actions is set to selected.

Methods

NameAccessible byRequired ParamsDescription
get_github_actions_permissions_repositorySELECTowner, repoGets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions allowed to run in the repository.

You must authenticate using an access token with the repo scope to use this
endpoint. GitHub Apps must have the administration repository permission to use this API.
set_github_actions_permissions_repositoryEXECowner, repo, data__enabledSets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository.

If the repository belongs to an organization or enterprise that has set restrictive permissions at the organization or enterprise levels, such as allowed_actions to selected actions, then you cannot override them for the repository.

You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the administration repository permission to use this API.