This version of GitHub Enterprise will be discontinued on This version of GitHub Enterprise was discontinued on 2020-05-23. 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.17

About required status checks

Required status checks ensure that all required CI tests are passing before collaborators can make changes to a protected branch.

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.

In this article

About required status checks

If you've enforced branch protections in your repository, you can set up required status checks. For more information, see "Configuring protected branches" and "Enabling required status checks." Required status checks can be checks or statuses. For more information, see "About status checks."

After enabling required status checks, all required status checks must pass before branches can be merged into the protected branch. After all required status checks pass, any commits must either be pushed to another branch and then merged or pushed directly to the protected branch.

Merge protected branch

Note: Any person or integration with write permissions to a repository can set the state of any status check in the repository. GitHub Enterprise does not verify that the author of a check is authorized to create a check with a certain name or modify an existing status. Before merging a pull request, you should verify that the author of each status, listed in the merge box, is expected.

Administrators of a repository can merge a protected branch even if required status checks have failed or are pending. You can require administrators to be subject to required status checks. For more information, see "Enabling required status checks."

Administrator merge of protected branch

Administrators can also merge a protected branch even if the branch is out of date with the base branch.

Required status checks settings

You can set up either loose or strict status checks, depending on whether you want to require your branch to be up to date with the base branch before merging. For more information, see "Types of required status checks."

Troubleshooting required status checks

If you have a check and a status with the same name and you select that name as a required status check, both the check and the status are required. For more information, see "Checks" in the GitHub Developer documentation.

Once you've set up required status checks, your branch must be up to date with the base branch before merging. This ensures that your branch has been tested with the latest code from the base branch. If your branch is out of date, you'll need to merge the base branch into your branch.

Note: You can also bring your branch up to date with the base branch using Git rebase. For more information, see "About Git rebase."

Out-of-date branch

You won't be able to push local changes to a protected branch until all required status checks pass. Instead, you'll receive an error message similar to the following:

remote: error: GH006: Protected branch update failed for refs/heads/master.
remote: error: Required status check "ci-build" is failing

Note: Pull requests that are up to date and pass required status checks can be merged locally and pushed to the protected branch. This can be done without status checks running on the merge commit itself.

Further reading

Ask a human

Can't find what you're looking for?

Contact us