Konubinix' opinionated web of thoughts

Add a New Branch Protection Rule via GitHub API?

Fleeting

github

it appears that GitHub has decided to add new features via the GraphQL API only, not via the REST API. So while this is impossible with the REST API, you can do it using the GraphQL createBranchProtectionRule mutation.

https://stackoverflow.com/questions/55122273/can-i-add-a-new-branch-protection-rule-via-github-api