You can require approving reviews from people with write permissions in the repository or from a designated code owner. Repository administrators or custom roles with the "edit repository rules" permission can require that all pull requests receive a specific number of approving reviews before someone merges the pull request into a protected branch. Restrict who can push to matching branchesįor more information on how to set up branch protection, see " Managing a branch protection rule." Require pull request reviews before merging Require deployments to succeed before mergingĭo not allow bypassing the above settings Require conversation resolution before merging Require pull request reviews before merging For information about an alternative to branch protection rules, see " About rulesets." About branch protection settingsįor each branch protection rule, you can choose to enable or disable the following settings. Note: Only a single branch protection rule can apply at a time, which means it can be difficult to know which rule will apply when multiple versions of a rule target the same branch. For more information, see " Automatically merging a pull request." You can configure a pull request to merge automatically when all merge requirements are met. For more information about branch name patterns, see " Managing a branch protection rule." For example, to protect any branches containing the word release, you can create a branch rule for *release*. You can create a branch protection rule in a repository for a specific branch, all branches, or any branch that matches a name pattern you specify with fnmatch syntax. For more information, see " Managing custom repository roles for an organization". You can optionally apply the restrictions to administrators and roles with the "bypass branch protections" permission, too. You can optionally disable these restrictions and enable additional branch protection settings.īy default, the restrictions of a branch protection rule don't apply to people with admin permissions to the repository or custom roles with the "bypass branch protections" permission. Actors may only be added to bypass lists when the repository belongs to an organization.īy default, each branch protection rule disables force pushes to the matching branches and prevents the matching branches from being deleted. You can enforce certain workflows or requirements before a collaborator can push changes to a branch in your repository, including merging a pull request into the branch, by creating a branch protection rule.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |