gitgithubgithub-rulesets

Repo rulesets deny me from merging PR into protected branch in usual way


I have created personal public repo. I set ruleset, that protects my main branch. Whenever Restrict updates rule is applied I'm not able to merge pr in protected branch in usual way. I mean without with this rule enabled I see notification "Merging is blocked The base branch does not allow updates." and under it I see checkbox "Merge without waiting for requirements to be met (bypass branch protections)". enter image description here

Is it expected behaviour? I was expecting that all users that are in Bypass list and owner of the repository should be able to merge PR in protected branch without this warning in usual way, like this enter image description here


Solution

  • This is expected behaviour. I got answer like this

    The behavior you're experiencing, where you see a notification but also have the option to bypass the branch protections, aligns with GitHub's design to balance between enforcing code quality and providing flexibility in repository management. It's important to use the bypass option judiciously, as it overrides the safeguards you've put in place.