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

|

5 min read

March 11, 2026

5 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

他の記事を読む

Copilotから次世代エージェントまで ― AIコーディングの歴史を振り返る

Copilotから次世代エージェントまで ― AIコーディングの歴史を振り返る

From Copilot to agents: The history of AI codingの意訳です。 AIコーディングエージェントの歴史は、誰もそれをエージェントと本格的に呼ぶ前から始まっています。2017年、論文「Attention Is All You Need」がTransformerアーキテクチャを発表し、現代の大規模言語モデルを実現可能にしました。 2020年には、CodeBER

CodeRabbit Planの紹介:良い計画で高速な開発、そして少ない手戻りを実現

CodeRabbit Planの紹介:良い計画で高速な開発、そして少ない手戻りを実現

Meet CodeRabbit Plan: Better plans. Faster deployments.の意訳です。 課題 コーディングエージェントを使用するチームには、明確で具体的かつコンテキストを意識したプロンプトが必要です。その課題を解決するため、私たちはCodeRabbit Planを構築しました。CodeRabbit Planはアイデア、チケット、またはテキストプロンプトのいずれか

コード関連タスクにおけるGemini 3.1 Pro:より集中的で、高いS/N比

コード関連タスクにおけるGemini 3.1 Pro:より集中的で、高いS/N比

Gemini 3.1 Pro for code-related tasksの意訳です。 実際のところ、開発者はプルリクエストに残されたコメントを通じてAIコードレビューを体験します。つまり、実際の問題をどのくらいの頻度で見つけるか、どのくらいノイズを発生させるか、そしてそのフィードバックがどの程度実行可能かです。 これらの質問に答えるため、GoogleのGemini 3.1 Proと、CodeRa

開発者がコードを読まなくなった後に、唯一読み続けるもの

開発者がコードを読まなくなった後に、唯一読み続けるもの

What devs will still read when they stop reading codeの意訳です。 コードは決して「読まれるため」に存在していたわけではありません。私たちには単に他に選択肢がなかっただけです。 現実世界の例を考えてみましょう。本番環境の決済サービスには、多層的なリトライロジック、冪等性キー、サーキットブレーカー、フィーチャーフラグ、そしてミドルウェアを通じて織り

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.