The name of the branch.
Get status checks protection
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub’s products in the GitHub Help documentation.
Path Parameters
Response
application/json
Response
Response
Status Check Policy
Status Check Policy
Example:https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks
Example:true
Example:["continuous-integration/travis-ci"]
Example:https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts
Path Parameters
Update status check protection
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub’s products in the GitHub Help documentation.
Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.
Path Parameters
The name of the branch.
Body
application/json
Body
Require branches to be up to date before merging.
The list of status checks to require in order to merge into this branch
Response
application/json
Response
Response
Status Check Policy
Status Check Policy
Example:https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks
Example:true
Example:["continuous-integration/travis-ci"]
Example:https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts
Path Parameters
Body
Remove status check protection
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub’s products in the GitHub Help documentation.
Path Parameters
The name of the branch.
Response
204
Response
Response
Path Parameters
Get all status check contexts
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub’s products in the GitHub Help documentation.
Path Parameters
The name of the branch.
Response
application/json
Response
Response
Path Parameters
Add status check contexts
Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub’s products in the GitHub Help documentation.
Path Parameters
The name of the branch.
Body
application/json
Body
One Of
contexts parameter
Response
application/json
Response
Response