Allowing to merge a PR on a locked branch for specific users #155242
Replies: 2 comments
-
|
Hello @Folux, I agree with the suggestion here too! I’m also curious to know how you achieve this: “During a code freeze, we lock the main branch via repository settings to prevent any merges.” Do you do it manually or automatically to enable the lock on Thursdays and disable it on Mondays as an example? |
Beta Was this translation helpful? Give feedback.
-
|
🕒 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! 💬 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
Hi GitHub community,
I’m looking for a way to refine how we handle code freezes using branch protection.
Currently, during a code freeze, we lock the main branch via repository settings to prevent any merges. This works well for blocking changes — but we have a specific need:
We’d like to allow a specific group of trusted users (e.g. leads or release managers) to bypass the branch lock and still merge PRs that meet all other requirements (e.g., approved reviews, status checks, etc.).
✅ What we want to keep:
• PRs are still required.
• All review and status check requirements remain enforced.
• Other users are blocked from merging due to the lock.
🚫 The current problem:
When we unlock the branch temporarily to allow an exception, all queued PRs immediately get merged by the merge queue — which defeats the purpose of a controlled freeze.
💡 Feature request:
We’d love a way to define a group (e.g., via a team or role) that can:
• Bypass the branch lock
• Only merge PRs that are otherwise valid (approved, passing checks, etc.)
• While keeping the lock in place for everyone else
Is this possible today, or would Github need to add this feature?
Beta Was this translation helpful? Give feedback.
All reactions