Learning center

Can a custom AI code review rule block a merge?

A review instruction can generate a comment. Blocking a merge also requires a result that the repository's merge policy enforces. Trace that connection before telling developers a rule is mandatory.

Try the missing-evidence case#

Suppose a repository requires a compatibility check for public API changes. CodeRabbit offers natural-language pre-merge checks that can report a pass, failure, or inconclusive result. In a trial pull request, remove a required field, then inspect the provider's check result and the merge decision. Repeat with the consumer contract unavailable.

Record what each outcome does at the protected branch. If the repository allows a merge with missing evidence, tighten the required status policy or add a deterministic contract check for that property. The wording of the instruction alone tells you nothing about the branch's behavior. CodeRabbit’s custom pre-merge checks

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading