Branch Protection V3
Protects a GitHub branch. The github.BranchProtection
resource has moved to the GraphQL API, while this resource will continue to leverage the REST API. This resource allows you to configure branch protection for repositories in your organization. When applied, the branch will be protected from forced pushes and deletion. Additional constraints, such as required status checks or restrictions on users, teams, and apps, can also be configured.
Import
GitHub Branch Protection can be imported using an ID made up of repository:branch
, e.g.
$ pulumi import github:index/branchProtectionV3:BranchProtectionV3 terraform terraform:main
Properties
Boolean, setting this to true
enforces status checks for repository administrators.
The GitHub repository name.
Boolean, setting this to true
requires all conversations on code must be resolved before a pull request can be merged.
Enforce restrictions for pull request reviews. See Required Pull Request Reviews below for details.
Enforce restrictions for required status checks. See Required Status Checks below for details.
Boolean, setting this to true
requires all commits to be signed with GPG.
Enforce restrictions for the users and teams that may push to the branch. See Restrictions below for details.