← Back

updateBranchProtection

Updates the branch protection on a branch in the course repository

Examples

Add branch protection to the default branch:

type: updateBranchProtection

Set branch protection on my-protected-branch:

type: updateBranchProtection
branch: my-protected-branch

Include specific branch protection settings:

type: updateBranchProtection
enforce_admins: false

Options

Title Property Description Default Required
Branch branch The name of the branch to update protection settings on. This will be the repo's default branch if none was provided.
Enforce protection for admins enforce_admins If enabled, these protection settings will be enforced for repository admins. true
Required status checks required_status_checks A list of status checks that are required before a pull request can be merged into this branch.
Required pull request reviews required_pull_request_reviews