Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub Enterprise: enforce code freeze during release?

Here, we use GitHub Enterprise. We have an issue with people accidentally merging PRs during code freeze windows, which interferes with our in-house release tool. It would be nice if we could find a way to prevent this.

What I'm trying to do, is find a way to disable the big green Merge button on each repo belonging to our Organisation within GitHub while our release tool is running, and then reenable it afterwards. Ideally, this would be scripted, since we have control over our release tool.

How might this be accomplished?

like image 611
Ben Fowler Avatar asked Oct 16 '25 16:10

Ben Fowler


1 Answers

There are numerous ways to do this; in the end, we went for changing the permissions (READ/WRITE/ADMIN) on (team, repository) combinations via the REST API.

That's not to say that webhooks, enabling/disabling branch restrictions, or the pre-merge would not work, however.

like image 169
Ben Fowler Avatar answered Oct 18 '25 10:10

Ben Fowler