Pull request reviews
Make it a required check
Turn the review’s verdict into a merge gate with GitHub rulesets or branch protection.
Turn the review’s verdict into a merge gate: pull requests with a blocking issue can’t be merged until it’s fixed. It takes about two minutes.
Before you start#
- The Audit Bench Ai GitHub App is installed on the repository. See GitHub.
- It has reviewed at least one pull request there. GitHub only lists checks it has seen recently, so open any small pull request first and wait for the Audit Bench Ai check to appear on it.
- You’re an admin of the repository or the organization.
Option A: a ruleset (recommended)#
- 1
Create a branch ruleset
In the repository, open Settings → Rules → Rulesets and choose New ruleset → New branch ruleset.
- 2
Name and enable it
Name it, for example “Require Audit Bench Ai”, and set Enforcement status to Active.
- 3
Choose the branches
Under Target branches, choose Add target → Include default branch, or add the branches you protect.
- 4
Require the check
Tick Require status checks to pass, then Add checks, type
Audit Bench Aiand select it. Click Create.
Organization admins can do the same once for every repository under the organization’s Settings → Repository → Rulesets.
Option B: classic branch protection#
- In the repository, open Settings → Branches and choose Add classic branch protection rule.
- Enter the branch name pattern, for example
main. - Tick Require status checks to pass before merging, search for
Audit Bench Aiand select it. - Click Create.
What the check means#
| Result | Meaning | Merge |
|---|---|---|
| Failure | A critical finding, a high-severity security finding, merge conflicts, failing CI or a likely secret | Blocked |
| Neutral | Issues worth a look, nothing blocking | Allowed |
| Success | No issues in the changed lines | Allowed |
Note
A review that couldn’t finish, because of a temporary error or a plan limit, closes as neutral, so it never locks a pull request.
When the check fails#
- Fix the issue and push. Every new commit is reviewed again and the check updates by itself.
- If the finding is wrong, reply to its comment explaining why. Audit Bench Ai rechecks and answers, and learns to stop raising that kind of comment. Then click Re-run on the check to review the latest commit again.
- In an emergency, repository admins can bypass the rule if your ruleset allows it (add them under Bypass list).