This has come up several times in our organization. We have some sort of emergency outage, or an organization wide code freeze. (For instance, over the Thanksgiving holiday) We rely on Slack/email to communicate that we’re in a code freeze, and that no one should merge code - but we’d really like a programmatic way to enforce this.
So my ideal feature would be a way to specify for a particular protected branch that merging is disabled. It could be very simple: just an option that says “Disable merges” with an optional reason field that would be displayed on all PRs next to the merge button. This would let us communicate “Site is down - do not merge until given the all clear” or “Code is frozen until Monday 11/27”, etc.
This would go a huge way toward letting us control our changes better. Getting fancier, you might want to support an “exclude list”, so the protection becomes “no one can merge except these users” to allow emergency fixes.
Thoughts? Is this the kind of functionality that others would find useful?