GitHub Checks API allows third-party applications to attach contextual information(status, conclusion, details, annotations) to a GitHub commit. After a successful job, RelativeCI GitHub application adds a Check with status, conclusion and details to the corresponding GitHub commit.
When the commit is the last in a pull request, the Check information is also available on the pull request checks section or under the Checks tab:
Click on Details link to navigate to the GitHub Check details report. The report shows the current, the baseline, and the delta values for all generic and file type metrics. Click on the metric label link to navigate to the specific section of the RelativeCI report.
GitHub Checks conclusion allows third-party applications to set the result of the check for the current changes. Depending on the conclusion value, GitHub will present a different UI to inform the user about the result of the check:
By default, the GitHub Check conclusion is set to
neutral. You can add rules to customize when to set the conclusion to
Managing project settings functionality is available for users with admin role (project/organization).
To manage the integration rules, navigate to Project -> Settings -> Integrations and go to GitHub Check section. You can add conditions based on any generic metric change(value or procentual):
RelativeCI evaluates the conditions for all active rules and sets the GitHub Check
conclusion based on the matched rule with the highest severity level.
By default, GitHub allows users to merge a pull request indifferent to a check conclusion. To prevent merging a pull request that has checks with
action_required, you can add/update a branch protection rule. 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 and search & select bundle-size check.
When the branch rule matches and the RelativeCI check conclusion is
action_requried, GitHub will disable the pull request merge:
Set check conclusion to Success on Bundle Size decrease:
Set check conclusion to Action required on Bundle Size increase with more than
Set check conclusion to Failure on Duplicate packages increase:
Set check conclusion to Action required on Bundle size increase with more than
5KB, or Initial JS increase, or Packages count increase: