Skip to content

Get GitHub Actions permissions for a repository

GET
/repos/{owner}/{repo}/actions/permissions

Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository.

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

API method documentation

owner
required
string

The account owner of the repository. The name is not case sensitive.

repo
required
string

The name of the repository without the .git extension. The name is not case sensitive.

Response

Media type application/json
object
enabled
required

Whether GitHub Actions is enabled on the repository.

boolean
allowed_actions

The permissions policy that controls the actions and reusable workflows that are allowed to run.

string
Allowed values: all local_only selected
selected_actions_url

The API URL to use to get or set the actions and reusable workflows that are allowed to run, when allowed_actions is set to selected.

string
sha_pinning_required

Whether actions must be pinned to a full-length commit SHA.

boolean
Examples
Example default
{
"enabled": true,
"allowed_actions": "selected",
"selected_actions_url": "https://api.github.com/repositories/42/actions/permissions/selected-actions",
"sha_pinning_required": true
}