Branch Protection - do not allow anyone to push straight to protected branch but allow admins to bypass PR review req #54969
Replies: 5 comments 14 replies
|
you can use the option |
|
I’m very surprised this isn’t a feature already. If using a git repo to control your deployments, you need the ability for certain people to be able to force-merge a pull request for emergencies without allowing those people to accidentally git push to the branch that is used to deploy from. |
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
|
I did similar thing to what @dannyskoog has suggested:
But the problem being I still can not bypass "required status checks to pass before merging". I have some integration tests that take a while to pass, and if I'm fixing just a typo I still have to wait for it to be passed. Any solution that Admins can bypass ALL requirements in the PR not only review? |
|
I stumbled upon the same problem, but I think there is now a solution (using Rulesets instead of Branch protections): Create a Ruleset (targeting
When I tried pushing to main, it was rejected. But at the pull request, I was able to check the box to bypass restrictions. Hope this helps |
Uh oh!
There was an error while loading. Please reload this page.
Select Topic Area
Question
Body
Hi - I was wondering if there is a way to allow individuals on a repo to bypass the pull request review requirement while at the same time do not allow them to push straight to a protected branch
I noticed the - Do not allow bypassing the above settings](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#do-not-allow-bypassing-the-above-settings)
but obviously that enforces everything to not be bypassed
thanks!
All reactions