Github API - Test Config

mutation createBranchProtectionRule

Create a new branch protection rule

Arguments
input CreateBranchProtectionRuleInput

CreateBranchProtectionRuleInput [input]

Autogenerated input type of CreateBranchProtectionRule

Attributes
allowsDeletions Boolean

Can this branch be deleted.

allowsForcePushes Boolean

Are force pushes allowed on this branch.

blocksCreations Boolean

Is branch creation a protected operation.

bypassForcePushActorIds ID []

A list of User, Team, or App IDs allowed to bypass force push targeting matching branches.

bypassPullRequestActorIds ID []

A list of User, Team, or App IDs allowed to bypass pull requests targeting matching branches.

clientMutationId String

A unique identifier for the client performing the mutation.

dismissesStaleReviews Boolean

Will new commits pushed to matching branches dismiss pull request review approvals.

isAdminEnforced Boolean

Can admins override branch protection.

lockAllowsFetchAndMerge Boolean

Whether users can pull changes from upstream when the branch is locked. Set to
true to allow fork syncing. Set to false to prevent fork syncing.

lockBranch Boolean

Whether to set the branch as read-only. If this is true, users will not be able to push to the branch.

pattern String

The glob-like pattern used to determine matching branches.

pushActorIds ID []

A list of User, Team, or App IDs allowed to push to matching branches.

repositoryId ID

The global relay id of the repository in which a new branch protection rule should be created in.

requireLastPushApproval Boolean

Whether the most recent push must be approved by someone other than the person who pushed it

requiredApprovingReviewCount Int

Number of approving reviews required to update matching branches.

requiredDeploymentEnvironments String []

The list of required deployment environments

requiredStatusCheckContexts String []

List of required status check contexts that must pass for commits to be accepted to matching branches.

requiredStatusChecks RequiredStatusCheckInput []

The list of required status checks

requiresApprovingReviews Boolean

Are approving reviews required to update matching branches.

requiresCodeOwnerReviews Boolean

Are reviews from code owners required to update matching branches.

requiresCommitSignatures Boolean

Are commits required to be signed.

requiresConversationResolution Boolean

Are conversations required to be resolved before merging.

requiresDeployments Boolean

Are successful deployments required before merging.

requiresLinearHistory Boolean

Are merge commits prohibited from being pushed to this branch.

requiresStatusChecks Boolean

Are status checks required to update matching branches.

requiresStrictStatusChecks Boolean

Are branches required to be up to date before merging.

restrictsPushes Boolean

Is pushing to matching branches restricted.

restrictsReviewDismissals Boolean

Is dismissal of pull request reviews restricted.

reviewDismissalActorIds ID []

A list of User, Team, or App IDs allowed to dismiss reviews on pull requests targeting matching branches.

API:
Github GraphQL API

Parameters for CreateBranchProtectionRule

Returns
CreateBranchProtectionRulePayload

CreateBranchProtectionRulePayload [object]

Autogenerated return type of CreateBranchProtectionRule

Attributes
branchProtectionRule BranchProtectionRule

The newly created BranchProtectionRule.

clientMutationId String

A unique identifier for the client performing the mutation.

API:
Github GraphQL API
API:
Github GraphQL API