Skip to main content

branch_policies

Overview

Namebranch_policies
TypeResource
Idgithub.repos.branch_policies

Fields

NameDatatypeDescription
idintegerThe unique identifier of the branch policy.
namestringThe name pattern that branches must match in order to deploy to the environment.
node_idstring

Methods

NameAccessible byRequired ParamsDescription
get_deployment_branch_policySELECTbranch_policy_id, environment_name, owner, repoGets a deployment branch policy for an environment.

Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
list_deployment_branch_policiesSELECTenvironment_name, owner, repoLists the deployment branch policies for an environment.

Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint.
create_deployment_branch_policyINSERTenvironment_name, owner, repo, data__nameCreates a deployment branch policy for an environment.

You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the administration:write permission for the repository to use this endpoint.
delete_deployment_branch_policyDELETEbranch_policy_id, environment_name, owner, repoDeletes a deployment branch policy for an environment.

You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the administration:write permission for the repository to use this endpoint.
update_deployment_branch_policyEXECbranch_policy_id, environment_name, owner, repo, data__nameUpdates a deployment branch policy for an environment.

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