apicheats.dev Cheat sheet Raw .md
PATCH

Try PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews — GitHub API

GitHub playground

Update pull request review protection

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.github.com; the proxy stores and logs nothing about them.

Headers

Path

Body application/json

6 body fields
  • dismissal_restrictions · optional · object — Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.
  • dismiss_stale_reviews · optional · boolean — Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.
  • require_code_owner_reviews · optional · boolean — Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed.
  • required_approving_review_count · optional · integer — Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.
  • require_last_push_approval · optional · boolean — Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`
  • bypass_pull_request_allowances · optional · object — Allow specific users, teams, or apps to bypass pull request requirements.