CodeRabbit logoCodeRabbit logo
エージェントエンタープライズカスタマー料金表ブログ
リソース
  • ドキュメント
  • トラストセンター
  • お問い合わせ
  • FAQ
  • レポート&ガイド
ログイン無料トライアルを開始
CodeRabbit logoCodeRabbit logo

プロダクト

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

ナビゲーション

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

リソース

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

問い合わせ

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

By signing up you agree to our Terms of Use and authorize CodeRabbit to provide occasional updates about products and solutions. You understand that you can opt out at any time and that your data will be handled in accordance with CodeRabbit 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 authorize CodeRabbit to provide occasional updates about products and solutions. You understand that you can opt out at any time and that your data will be handled in accordance with CodeRabbit 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

他の記事を読む

作業前・作業中・作業後:AIエージェントが信頼を得る3つの瞬間

作業前・作業中・作業後:AIエージェントが信頼を得る3つの瞬間

AIエージェントがより多くのコードと長いタスクを扱うようになると、「結果を信頼する」だけでは足りません。重要な3つの瞬間における説明可能性が、なぜ今やプロダクトそのものになっているのかを見ていきます。

開発者が30秒でバグを承認する瞬間を目撃しました

開発者が30秒でバグを承認する瞬間を目撃しました

カンファレンスで何百人もの開発者と話して見えてきたのは、1つの共通点でした。チームはレビューがボトルネックだとわかっているのに、最初から用意されていたものをそのまま使い続けているのです。

最新レポートの公開:aiで生成されたコードは1.7倍多く問題を生み出す

最新レポートの公開:aiで生成されたコードは1.7倍多く問題を生み出す

AI vs human code gen report: AI code creates 1.7x more issuesの意訳です。 数百件のオープンソースPull Requestを分析して分かったこと この1年で、AIコーディングアシスタントは「新しいツール」から「日常的に使われる存在」へと急速に変化しました。現在では、多くの組織においてコード変更の一部がAIによって生成、もしくはAIの支援を受けて作られています。 しかし、開発スピードが加速する一方で、次のような疑問が静かに広がっていました...

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.