Reputation: 37037
Something has changed on GitHub's branch protection rules page recently (?).
Require approvals is always enabled (in checked state). Is there any way to disable it? Previously, I'm pretty sure this was possible. Now it's confusing, especially since the description says "When enabled, ...", suggesting that there is a way to disable it.
Upvotes: 8
Views: 2970
Reputation: 2172
At this time of writing, there seems to be no point for this checkbox to be disabled, because its state does seem to influence the repository settings. It feels like the UI changes to the Branch protection rule page are still a work in progress.
You can enable it using your browsers Developer tools and removing the disabled="disabled"
attribute of the <input>
element, at which point you may uncheck the checkbox.
The dropdown for the required number of approval now disappears.
Once you uncheck it and subsequently save your Branch protection rule, it will reset the required amount of approvals to zero, even though the checkbox resets to its disabled state.
At this point you don't need any approvals to merge into the protected branch.
This trick allows small teams or single developers to continue using Pull Requests to organize their workflow, without enforcing PR approvals.
Upvotes: 10