actions

Update a repository Actions policy

Update an Actions policy for a repository. Omitting workflow_path preserves the policy's existing workflow targeting.

put/repos/{owner}/{repo}/actions/policies/{policy_id}

Path parameters

ownerstring required

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

repostring required

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

policy_idinteger required

The ID of the policy.

Request body

namestring

The name of the policy.

enforcement'disabled' | 'active' | 'evaluate'

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (evaluate is only available with GitHub Enterprise).

Response

Response

idinteger required

The ID of the policy

namestring required

The name of the policy

target'actions' required

The target of the policy

source_type'Repository' | 'Organization' | 'Enterprise' required

The type of the source of the policy

sourcestring required

The name of the source

enforcement'disabled' | 'active' | 'evaluate' required

The enforcement level of the ruleset. evaluate allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (evaluate is only available with GitHub Enterprise).

node_idstring
created_atstring date-time
updated_atstring date-time

Changes