The name of the branch.
Delete branch 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
Response
Response
Path Parameters
Get admin branch 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
200 application/json
Response
Response
Protected Branch Admin Enforced
Protected Branch Admin Enforced
Example:https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins
Example:true
Path Parameters
Set admin branch 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.
Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
Path Parameters
The name of the branch.
Response
200 application/json
Response
Response
Protected Branch Admin Enforced
Protected Branch Admin Enforced
Example:https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins
Example:true
Path Parameters
Delete admin branch 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.
Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
Path Parameters
The name of the branch.
Response
Response
Response
Path Parameters
Get pull request review 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
200 application/json
Response
Response
Protected Branch Pull Request Review
Protected Branch Pull Request Review
Example:https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions
Show Child Parameters
Example:true
Example:true
>= 1<= 6
Example:2