GET
/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviewsGet 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.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
branchstringrequired
The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql).
200Response
urlstringoptional
dismissal_restrictionsobjectoptional
bypass_pull_request_allowancesobjectoptional
Allow specific users, teams, or apps to bypass pull request requirements.
dismiss_stale_reviewsbooleanrequired
require_code_owner_reviewsbooleanrequired
required_approving_review_countintegeroptional
require_last_push_approvalbooleanoptional
Whether the most recent push must be approved by someone other than the person who pushed it.