Updates the branch protection on a branch in the course repository
Add branch protection to the master branch:
type: updateBranchProtectionSet branch protection on my-protected-branch:
type: updateBranchProtection
branch: my-protected-branchInclude specific branch protection settings:
type: updateBranchProtection
enforce_admins: false| Title | Property | Description | Default | Required |
|---|---|---|---|---|
| Branch | branch |
The name of the branch to update protection settings on. This defaults to master. |
master |
|
| 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 |