Code review
Checks and merge gate
Codebot reports every review as a check on the pull request, and can block merges while critical issues are open.
The check
Every review posts a check on the pull request’s head commit, named after the review, Code review. It shows while the review runs and links to the run in the web app.
| Check result | When |
|---|---|
| In progress | The review is running. |
| Success | Codebot approved, or found no issues. |
| Neutral | Codebot commented or requested changes, or the run failed. |
| Skipped | A skip rule matched. The check says which one. |
| Failure | Only with the merge gate on: blocking issues are open. |
On Azure DevOps the check is a pull request status, codebot/Code review. Azure DevOps has no neutral state, so neutral shows as succeeded with the verdict in the description.
Turning on the merge gate
Fail the check on blocking issues
In Code review → Review, turn on Fail the check on blocking issues and save.
Require the check
- GitHub: in the repository’s branch protection rule or ruleset for your main branch, require the Code review status check.
- Azure DevOps: add a branch policy that requires the
codebot/Code reviewstatus.
What counts as open
While the gate is on, the check fails when there are open blocking issues: critical or high findings from this review, plus earlier Codebot threads with a critical or high finding that are still unresolved.
To unblock a pull request, fix the issues and push: the next review resolves the threads it sees fixed. If a finding is wrong, resolve its thread yourself. It counts as closed at the next review, on the next push or @trycodebot review.
A run that crashes or times out leaves the check neutral, so a required check passes. Codebot never blocks a merge because of its own failure.