This version of GitHub Enterprise will be discontinued on This version of GitHub Enterprise was discontinued on 2020-08-20. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Article version: Enterprise Server 2.18

Enabling required reviews for pull requests

Repository administrators can enforce required reviews so that pull requests must have a specific number of approving reviews before they are merged.

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.

Before enabling required reviews on a branch, you must first set the branch up as a protected branch. For more information, see "Configuring protected branches."

You can automatically enforce protected branch settings for some or all branches in your repository. For more information, see "Configuring protected branches."

  1. On GitHub Enterprise, navigate to the main page of the repository.
  2. Under your repository name, click Settings.
    Repository settings button
  3. In the left menu, click Branches.
    Repository options sub-menu
  4. Next to "Branch protection rules", click Add rule.
    Add branch protection rule button
  5. Under "Branch name pattern", type the branch name or pattern you want to protect.
    Branch rule field
  6. Select Require pull request reviews before merging.
    Pull request review restriction checkbox
  7. In the Required approving reviews drop-down menu, select the number of approving reviews you'd like to require on the branch.
    Drop-down menu to select number of required review approvals
  8. Optionally, select Dismiss stale pull request approvals when new commits are pushed. This dismisses a pull request approval review when a code-modifying commit is pushed to the branch.
    Dismiss stale pull request approvals when new commits are pushed checkbox
  9. Optionally, select Require review from Code Owners to require review from a code owner when the pull request affects code that has a designated owner. For more information, see "About code owners."
    Require review from code owners
  10. Optionally, if the repository is part of an organization, select Restrict who can dismiss pull request reviews to search for and select the people or teams who can dismiss pull request reviews. For more information, see "Dismissing a pull request review." This option is not available for personal repositories.
    Restrict who can dismiss pull request reviews checkbox
  11. Optionally, select Include administrators. This enforces all configured restrictions for repository administrators.
    Include administrators checkbox
  12. Click Create.

Further reading

Ask a human

Can't find what you're looking for?

Contact us