Programmatic changing of repos to use "Rebase and Merge" by default

Hello all,

I’m wondering if anyone has any good – and hopefully programmatic means – of updating repositories default PR merge mechanism to use “Rebase and Merge”. This is currently only available to be set per repository. On Github, I currently have ~400 repositories which I am looking to change, and could do with being able to do this in an automated means.

Has anyone ever done this before, and/or got any suggestions on how to do this which isn’t manually? In reading about the github CLI 1.0 release, I’m wondering if gh api might help here? If so, any examples welcome.



Hey @ThomasAdam :wave:

AFAIK, there is no way to define the default merge mechanism to Rebase and Merge, programatically. I’m only aware of applying permissions to allow a repository this functionality:

…with allow_rebase_merge.

Beyond this, I would highly encourage you to submit your suggestion via our feedback form, here:

…which is reviewed directly by our PM team for consideration.

Thank you so much for raising this, but let us know if you have any followups we can assist with. :bow: