GitHub Commit Status review

Adds GitHub Commit Status for the corresponding pull request commit and asks for the bundle stats changes review when the check fails.

RelativeCI GitHub Commit Status Review flow

The review flow allows you to require the review of the RelativeCI report based on a set of conditions specific to the project. Reviewing the bundle changes during the code review process helps to identify regressions easily and fix them before shipping to production.

RelativeCI GitHub Commit Status Review - GitHub Pull Request checks

Configure

To enable the GitHub Commit Status review integration, navigate to your Project -> Settings -> Integrations -> GitHub Commit Status review page and add the conditions you want to evaluate for each job. You can base a condition on any metric value or absolute/percentual change. For example, to ask for a review when the Bundle Size increases with more than 10KB, select Bundle Size - Absolute difference metric, Greater than operator, and enter 10240 value:

RelativeCI GitHub Commit Status Review - app settings

Quickstart

To quickly set up the check, click the "Add recommended conditions" button to load a set of recommended conditions, update the values to match your needs and save the settings.

RelativeCI GitHub Commit Status Review - app settings - recommended conditions

Review flow

When the conditions set evaluates to true, the review will be required, and the GitHub commit status will be set to Pending. To review and approve or reject the changes, click the GitHub commit status "Details" link to navigate to the RelativeCI job review section.

RelativeCI GitHub Commit Status Review - job review

Click on the metric label to navigate to the corresponding section of the report and evaluate the changes.

Based on the user's action(approve or reject), the status of the review will be set to "Success" or "Error".

If the conditions set evaluates to false, the check passes, the GitHub commit status will be set to "Success", and no action will be required:

RelativeCI GitHub Commit Status Review - passed

Require GitHub status check to pass before merging

By default, GitHub enables users to merge a pull request regardless of the check status. You can activate a branch protection rule to block the pull request and require the users to review the RelativeCI bundle stats report. To manage a branch protection rule, navigate to your GitHub project Settings -> Branches -> Protect matching branches and click Add rule or Edit. Activate Require status checks to pass before merging option, search for relative-ci check and select it.

RelativeCI GitHub Commit Status Review - GitHub protected branch settings

When the branch rule matches and the RelativeCI status check is pending, the user action will be required to review and approve the RelativeCI bundle stats changes:

RelativeCI GitHub Commit Status Review - GitHub protected branch pending check

After the bundle stats changes are reviewed and approved, the RelativeCI status check is set to success and GitHub will allow the pull request merge:

RelativeCI GitHub Commit Status Review - GitHub protected branch success check

Need help?Contact us via email, Twitter, or GitHub!