All Collections
Feature guides
Version control
Managing status check rules in GitHub
Managing status check rules in GitHub

How to enable or disable the requirement for Gearset-related status checks to pass before merging a pull request in GitHub

Gabriel Cowley avatar
Written by Gabriel Cowley
Updated over a week ago

Gearset's status check integration with GitHub allows you to control when pull requests can be merged, based on the results of the CI job.

How does it work?

Gearset's status check integration works with any CI job that uses a GitHub repository as the source of the deployment.

Whenever the job runs, Gearset will automatically post the build status (succeeded or failed) back to GitHub, referencing the relevant git commit and the outcome of the job (success or failure).

This gives you direct insight into the status of a related CI job from within GitHub, without looking up the results in Gearset. 

If required status checks are enabled in your repository settings, it can also help ensure that GitHub pull requests are not merged until everything is in order and the CI job can successfully run the validation or deployment. 

How are required status checks set up in GitHub?

The instructions below show you how to enable or disable required status checks for your GitHub repository.

  1. Navigate to the Settings page of your GitHub repository.

  2. In the left-hand menu, click Branches.

  3. Under Branch protection rules, either click Edit for a rule that you would like to change, or click Add rule at the top to create a new rule.

  4. If adding a new rule, enter the desired branch name in the Apply rule to field.

  5. To enforce the status checks rule, check Require status checks to pass before merging in Rule settings.

  6. If Gearset has posted a build status to the repository in the last week, you should see an item labelled gearset in the checkbox list that appears when you check the item in step 5. Check or uncheck this item depending on whether you want Gearset build statuses to control whether a PR can be merged or not.

Did this answer your question?