Originally posted at: https://dev.venntro.com/2017/06/02/enable-github-protected-branches.md
We recently decided, for safety reasons and ensuring solid reviews, protecting our master branches in GitHub was something we should be doing. Having looked into it, a few quick clicks later our core repositories were done. The challenge came down the line when we needed to easily turn them all on. With >100 repositories that would be somewhat of an arduous point and click task so I knocked up a crude and basic script to do it for me.
For reference a few pages on GitHub’s site are useful: