I'm trying to create a simple rule to protect the main
branch of a repository but it results in Rule is invalid
. I am the creator of the repo. Using GitHub Enterprise Server 2.22.6.
What am I missing?
Steps:
Require pull request review before merging
Error: Rule is invalid
The Branch name pattern
dialog box is meant to contain the name of a branch or a regular expression to capture multiple branch names. It is not meant to contain the name or description of a branch protection rule.
Try entering a regular expression or the name of the branch you'd like to protect (e.g. main
instead of Protect Master
) into the Branch name pattern
textbox.
See the docs here for more information.