CodeRabbit logoCodeRabbit logo
プランエンタープライズカスタマー料金表ブログ
リソース
  • ドキュメント
  • トラストセンター
  • お問い合わせ
  • FAQ
  • ホワイトペーパー
ログイン無料試用を開始
CodeRabbit logoCodeRabbit logo

プロダクト

プルリクエストレビューIDE レビューCLI レビューオープンソース

ナビゲーション

私たちについて特徴FAQシステムステータス採用データ保護附属書スタートアッププログラム脆弱性開示

リソース

ブログドキュメント変更履歴利用事例トラストセンターブランドガイドライン

問い合わせ

サポートセールス料金表パートナーシップ

By signing up you agree to our Terms of Use and Privacy Policy

discord iconx iconlinkedin iconrss icon
footer-logo shape
利用規約プライバシーポリシー

CodeRabbit Inc © 2026

CodeRabbit logoCodeRabbit logo

プロダクト

プルリクエストレビューIDE レビューCLI レビューオープンソース

ナビゲーション

私たちについて特徴FAQシステムステータス採用データ保護附属書スタートアッププログラム脆弱性開示

リソース

ブログドキュメント変更履歴利用事例トラストセンターブランドガイドライン

問い合わせ

サポートセールス料金表パートナーシップ

By signing up you agree to our Terms of Use and Privacy Policy

discord iconx iconlinkedin iconrss icon

Pre-Merge Checks: Built-in & custom PR rules automatically enforced

by
Konrad Sopala

Konrad Sopala

March 11, 2026

4 min read

March 11, 2026

4 min read

  • What are Pre-Merge Checks?
  • Built-In Checks
  • Custom Checks
  • Flexible configuration
  • Manual controls
  • Why this matters
  • Get started with Pre-Merge Checks
Back to blog
Cover image

共有

https://victorious-bubble-f69a016683.media.strapiapp.com/X_721afca608.pnghttps://victorious-bubble-f69a016683.media.strapiapp.com/Linked_In_a3d8c65f20.pnghttps://victorious-bubble-f69a016683.media.strapiapp.com/Reddit_feecae8a6d.png

他の記事を読む

CodeRabbitがどうやって大規模コードベースで正確なAIコードレビューを実現しているか

CodeRabbitがどうやって大規模コードベースで正確なAIコードレビューを実現しているか

How CodeRabbit delivers accurate AI code reviews on massive codebasesの意訳です。 大規模なコードベースは特別な存在です。数百のファイルに広がり、何年ものコミットで進化し、時にはなんとか組織的な記憶でつながっているように見えることもあります。その環境で変更をレビューするのは難しいだけでなく、まるで考古学の発掘作業のようです。この行が先週ここに移動したのは理由があったのか?他のファイルが密かに依存しているのではないか? まさにそこ...

CodeRabbitのMCP連携 = コンテキストとコードレビュー

CodeRabbitのMCP連携 = コンテキストとコードレビュー

CodeRabbit MCP server integration: Code reviews with more contextの意訳です。 すべての開発チームは、孤立した状態で行うコードレビューのつらさを知っています。AIツール(あるいはチームメイト)であっても、文法やスタイル、パターンにコメントはできます。しかしビジネス要件、デプロイ依存関係、組織的な知識がなければ、全体像の半分を推測に基づいている状態です。 CodeRabbitは現在、Linear、Jira、Circle CIといったい...

Mcp時代におけるコンテキスト肥大化への対応

Mcp時代におけるコンテキスト肥大化への対応

Ballooning context in the MCP era: Context engineering on steroids意訳です。 かつて、LLMにコンテキストを渡すには、ハックやベクターストラテジー、そしてお祈り…と、過剰に複雑なRAGパイプラインをつなぎ合わせる必要がありました。そこに登場したのが Model Context Protocol (MCP)。外部データを本番環境のモデルに提供するための、クリーンでモジュール的手法です。MCPは、実際に「何かをする」エージェントシステ...

All development teams claim to have pr standards, which often include requirements like: "Ensure docstrings are added," "Reference the associated issue," and "Avoid logging sensitive information."

Defining those standards is easy. Enforcing them consistently as PR volume grows is not.

If you’re an admin or team lead, you want your team to follow best practices before merging a PR every time, not just when someone remembers the checklist. If you’re a developer, you want to know immediately when something fails and how to fix it fast so you can merge.

Pre-merge Checks make your definition of done enforceable. CodeRabbit evaluates every pull request automatically using built-in validations and custom rules written in plain English. Your baseline expectations come out of the box, and your team-specific guardrails run on every PR without anyone having to remember them.

Pre-Merge Checks address the gap between simply having guidelines and actually enforcing them.

What are Pre-Merge Checks?

Pre-Merge Checks automatically evaluate a pull request whenever it opens or updates. Instead of relying on reviewers to mentally track every policy, CodeRabbit runs structured checks and reports on what passed, what failed, and what needs attention.

https://youtu.be/knoETRikfwg

Checks can run in warning mode or error mode. You can introduce guardrails gradually before turning them into merge blockers and slowing developers down.

Built-In Checks

Pre-Merge Checks include built-in validations for common PR requirements most teams already expect.

  • Docstring coverage thresholds: Enforces minimum documentation coverage for new or modified code against a configurable threshold (80% by default).

  • PR title validation: Requires imperative verbs, character limits, or specific formatting conventions.

  • PR description validation: Ensures required sections such as rollout notes or breaking changes exist.

  • Linked issue verification: Confirms the PR references an approved issue or ticket.

  • Issue alignment assessment: Flags when changes extend beyond the scope of the linked issue.

These checks remove repetitive review comments and keep standards consistent across contributors. No more extra tooling or manual enforcing policies.

Custom Checks

Every team has rules that do not show up in generic linters. Custom checks let you define those requirements in natural language and enforce them automatically.

Examples:

  • Sensitive data in logs: Fails a PR if log statements may include passwords, API keys, tokens, SSNs, or payment data.

  • Hardcoded credentials: Detects live keys or variables like SECRET, KEY, or *_PASSWORD in non-test files.

  • Database migration safeguards: Requires both up() and down() methods and flags destructive changes without rollback logic.

  • Breaking change documentation: Ensures public API, CLI, environment variable, or schema changes are documented in the PR and reflected in CHANGELOG.md.

  • Language migration policies: Gradually phases out legacy languages by blocking new files while allowing edits to existing ones.

You define the rule once and CodeRabbit evaluates it on every pull request. That’s automated governance without brittle CI scripts or regex hacks. Check out our documentation for further details on how to write effective instructions for Custom checks.

Flexible configuration

You can configure Pre-Merge Checks in the CodeRabbit web interface or commit them to your repository using a .coderabbit.yaml file.

That means your PR policies live alongside your code and evolve with it.

Example:

reviews:
  pre_merge_checks:
    docstrings:
      mode: "error"
      threshold: 85
    title:
      mode: "warning"
      requirements: "Start with an imperative verb; keep under 50 characters."
    description:
      mode: "error"
    issue_assessment:
      mode: "warning"
  custom_checks:
    - name: "Undocumented Breaking Changes"
      mode: "warning"
      instructions: "All breaking changes to public APIs must be documented in the PR and CHANGELOG.md."

You can even introduce new guardrails in a warning state first, allowing your team to adjust. Once the rule is refined and the team is ready, transition it to an error state. Guardrails should evolve naturally with your team's process rather than being implemented abruptly.

Manual controls

You can also trigger checks directly inside a pull request.

Run all configured checks:

@coderabbitai run pre-merge checks

Test a custom rule before saving it:

@coderabbitai evaluate custom pre-merge check --name <check_name> --instructions <text> --mode <error|warning>

Override failures when necessary:

@coderabbitai ignore pre-merge checks

Why this matters

Without automated enforcement:

  • Reviewers spend time re-checking predictable requirements

  • Standards drift across teams

  • Safeguards depend on memory

  • High-signal review time gets wasted on hygiene

With Pre-Merge Checks:

  • Standards apply consistently to every PR

  • Risky patterns get flagged automatically

  • Breaking changes get documented before merge

  • Reviewers focus on architecture, tradeoffs, and edge cases

Pre-Merge Checks answer one question before code lands: Does this PR meet our standards?

If not, you get clear feedback. If it does, you merge with confidence. This transforms informal guidelines into built-in, customizable, and automatic guardrails that are fully enforceable.

Get started with Pre-Merge Checks

Enable Pre-Merge Checks in CodeRabbit and start with one rule your team already cares about like docstrings, breaking changes, migration safety, or title conventions.

Run them in warning mode and see what gets flagged. Then move to enforcement when you are ready.

Standards are easy to write. Enforcement is what changes behavior.

Try CodeRabbit on your next pull request and see what it catches. Pre-Merge Checks are available for Pro plan users and allow users to configure up to 5 custom checks per organization.