Add a New Branch Protection Rule via GitHub API?
Fleeting- Référence externe : https://stackoverflow.com/questions/55122273/can-i-add-a-new-branch-protection-rule-via-github-api
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