Technical guide · Pull Request workflow
Automatic merge blocking on GitHub with required GitHub Checks
“A bad PR got merged because nobody reviewed it in time” is a common problem in teams without a mandatory review process. This guide explains how GitHub lets you automatically block merging until certain conditions are met, and how an AI review tool fits into that workflow.
What required GitHub Checks are
GitHub lets you configure branch protection rules on a repository's main branch. One of these rules is requiring certain status checks — automated checks, such as tests, linters, or a security review — to finish successfully before the merge button becomes available. Without this configuration, any PR can be merged at any time, regardless of what the checks report.
The problem this solves
Without required checks, merge quality depends entirely on human discipline — someone has to remember to wait for review before merging, even under deadline pressure. In large teams or teams spread across multiple time zones, it's common for a PR to get merged before a human reviewer (or an automated analysis) has finished evaluating the code. Making the check required removes that dependency on remembering — GitHub itself blocks the merge until the condition is met.
How to configure it (overview)
- Go to the repository settings on GitHub, under Settings → Branches.
- Create or edit a protection rule for the main branch (usually main).
- Turn on the option to require status checks to pass before merging, and select which checks are required (for example, the check published by an automated review tool installed as a GitHub App).
- Save the rule — from then on, any PR that doesn't satisfy the selected checks won't be able to be merged through the GitHub interface.
How an AI review connects to this workflow
An automated review tool installed as a GitHub App publishes its own verification status (check) on every Pull Request. That's how Akira works: on each PR, it publishes a review comment and a check status right on the GitHub timeline. If the repository sets that check as required (following the steps above), the merge becomes conditional on that verification — the decision to make the check required is always the team's, made in GitHub's own settings, not something imposed by the tool.