Branch Protection: Require Pull Requests
The following rule type is available for requiring a review from code owners.
stacklok/branch_protection_require_pull_requests
- Verifies that a branch requires pull requests
Ensure that the setting to require a pull request before merging to a branch is enabled for the branch protection rule.
This requires that a pull request be opened before merging to a branch.
For more information, see https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule
Entity
repository
Type
stacklok/branch_protection_require_pull_requests
Rule parameters
The stacklok/branch_protection_require_pull_requests
rule supports the following parameters:
branch (string)
- The name of the branch to check. If left empty, the default branch will be used.
Rule definition options
The stacklok/branch_protection_require_pull_requests
rule supports the following options:
required_pull_request_reviews (boolean)
- When enabled, all commits must be made to a non-protected branch and submitted via a pull request before they can be merged into a branch that matches this rule.