Grant GitHub Apps push access to protected branches
The Protected Branches API now allows you to grant GitHub Apps push access to protected branches.
You can only grant GitHub Apps push access to a protected branch if they have been installed with the repository contents write
permission.
The Protected Branches API now includes the following endpoints:
GET /repos/:owner/:repo/branches/:branch/protection/restrictions/apps
PUT /repos/:owner/:repo/branches/:branch/protection/restrictions/apps
POST /repos/:owner/:repo/branches/:branch/protection/restrictions/apps
DELETE /repos/:owner/:repo/branches/:branch/protection/restrictions/apps
The existing endpoint to set branch protection now accepts app restrictions:
If you have any questions or feedback, please get in touch!