Skip to content

ci: auto-review stacked PRs whose base is a feat/ or fix/ branch - #1822

Merged
vitali87 merged 1 commit into
mainfrom
fix/1581-review-stacked-prs
Sep 9, 2026
Merged

vitali87 merged 1 commit into
mainfrom
fix/1581-review-stacked-prs

Conversation

@vitali87

@vitali87 vitali87 commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner

Closes #1581.

CodeRabbit auto-review defaults to the default branch only, so on a stacked
chain every layer above the bottom is skipped and only the bottom PR is ever
read. The issue measured 14 of 18 open PRs never reviewed, each carrying a
skip notice that is easy to read as a clean result.

reviews.auto_review.base_branches accepts regex patterns and defaults to
[], which is precisely why every stacked PR was skipped.

One correction to the issue

#1581 states the repo has no .coderabbit.yaml and the fix is a pure
addition. It has one now, added by 9320c7c for #1617 to turn off the
docstring pre-merge check. So this is an edit, and that setting had to be
preserved. Verified it still parses as the string off after the change --
the quotes are load-bearing, since unquoted mode: off yields boolean
False, which is schema-invalid.

Why two anchored prefixes rather than .*

A base that is neither the default branch nor a recognised stack layer should
keep default behaviour rather than silently opting in.

The ^ is load-bearing. Unanchored, under search semantics, feat/.* and
fix/.* would also match notfeat/x, release/feat/x, myfix/x and
hotfix/urgent. Anchored, all four correctly do not match. The trailing .*
is redundant under search semantics but required under fullmatch, and the
vendor docs do not say which is used, so it is kept.

Verification

Note when re-deriving that coverage: PRs retargeted to main before merging
now REPORT base=main, so recent history understates which prefixes were
stack bases. #1571-#1576 read as main today and were fix/... when the
issue was written.

Known gap, not introduced here

Nothing validates .coderabbit.yaml before merge. check-yaml checks syntax
only, and the vendor schema sets additionalProperties: false at the ROOT
only -- so a base_branchez typo under auto_review validates with 0 errors
and silently restores the bug this PR fixes. Measured, not assumed.

The repo has the right precedent in scripts/validate_labels.py, wired into
pre-commit and ci.yml. A follow-up doing the same for .coderabbit.yaml
would close it. Filing separately rather than widening this PR.

Summary by CodeRabbit

  • Chores
    • Configured automatic reviews for recognized feature and fix branch bases.
    • Existing behavior for other branch bases remains unchanged.

@vitali87

vitali87 commented Sep 9, 2026

Copy link
Copy Markdown
Owner Author

@greptileai review

@coderabbitai

coderabbitai Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 8bf5eedd-4012-4c9b-a0c1-53b69a382245

📥 Commits

Reviewing files that changed from the base of the PR and between 97d1b2d and 423defc.

📒 Files selected for processing (1)
  • .coderabbit.yaml

Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The repository adds .coderabbit.yaml configuration for automatic reviews on feat/ and fix/ stacked branch bases. Other base branches remain unchanged.

Changes

Auto-review configuration

Layer / File(s) Summary
Branch base review patterns
.coderabbit.yaml
Adds reviews.auto_review.base_branches with anchored feat/* and fix/* patterns.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 423de

This change enables automatic reviews for stacked PRs based on feature and fix branches without changing application behavior. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the primary change: enabling CodeRabbit auto-review for stacked pull requests based on feat/ or fix/ branches. It also follows Conventional Commits format.
Description check ✅ Passed The description provides a detailed summary, links issue #1581, explains the configuration change, documents preservation of mode: "off", and records validation. It does not reproduce all template hea…
Linked Issues check ✅ Passed The change satisfies issue #1581 by configuring auto-review for stacked pull requests with feat/ and fix/ base branches. The anchored patterns preserve default behavior for unrelated branches, and the…
Out of Scope Changes check ✅ Passed The changes are limited to .coderabbit.yaml and directly support the linked issue. No unrelated code or configuration changes are present.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/1581-review-stacked-prs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR extends CodeRabbit automatic-review eligibility to stacked PRs targeting feat/ or fix/ branches while preserving the existing docstring pre-merge setting and default-branch behavior.

  • Adds anchored patterns for recognized stacked-branch bases.
  • Leaves unrelated non-default branch prefixes excluded.
  • Preserves docstrings.mode as the string "off".

Confidence Score: 5/5

The PR appears safe to merge with no actionable issues identified.

The configuration extends automatic reviews to the intended stacked branch prefixes without disabling reviews for the default branch or broadening eligibility to unrelated branches.

Important Files Changed

Filename Overview
.coderabbit.yaml Adds correctly scoped automatic-review base-branch patterns while preserving existing configuration.

Reviews (1): Last reviewed commit: "ci: auto-review stacked PRs whose base i..." | Re-trigger Greptile

@sonarqubecloud

sonarqubecloud Bot commented Sep 9, 2026

Copy link
Copy Markdown

@vitali87
vitali87 merged commit 78dfd93 into main Sep 9, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

CodeRabbit auto-review is skipped on every stacked PR, so 14 of 18 open PRs have never been reviewed

1 participant