- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.2k
Direct renovate to the appropriate branches #5084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| WalkthroughAdds top-level  Changes
 Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
 ✅ Passed checks (2 passed)
 ✨ Finishing touches🧪 Generate unit tests (beta)
 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. Comment  | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
renovate.json (3)
70-74: Automerge patch to release looks good; disable patch on main to avoid duplicate PRsAs written, patches will still open on main (not automerged). If you want patches exclusively on release, add a rule to disable patch updates on main.
{ "description": "Patch updates go to release branch", "matchUpdateTypes": ["patch"], "matchBaseBranches": ["release"], "automerge": true }, + { + "description": "Disable patch updates on main", + "matchUpdateTypes": ["patch"], + "matchBaseBranches": ["main"], + "enabled": false + },
75-79: Minor-on-main is fine; consider disabling minor/major on release to match the PR goalTo fully achieve “others to main,” explicitly disable minor and major updates on release. Otherwise Renovate will still raise those on release (not automerged).
{ "description": "Minor updates go to main branch", "matchUpdateTypes": ["minor"], "matchBaseBranches": ["main"], "automerge": true }, + { + "description": "Disable minor updates on release", + "matchUpdateTypes": ["minor"], + "matchBaseBranches": ["release"], + "enabled": false + }, + { + "description": "Disable major updates on release", + "matchUpdateTypes": ["major"], + "matchBaseBranches": ["release"], + "enabled": false + },
9-9: Renovate baseBranches verified — both 'main' and 'release' exist on origingit ls-remote returned refs/heads/main and refs/heads/release, so Renovate will open PRs against both branches; if your intent is "patches only to release, others to main" add rules to disable the opposite branch-target combos.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
- renovate.json(3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{json,yml,yaml}
📄 CodeRabbit inference engine (CLAUDE.md)
Indent JSON and YAML with 2 spaces
Files:
- renovate.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How will we sync patch updates between these two branches? Merge release into main every week?
        
          
                renovate.json
              
                Outdated
          
        
      | }, | ||
| { | ||
| "description": "Minor updates go to main branch", | ||
| "matchUpdateTypes": ["minor"], | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And major?
79ff26f    to
    6ecb416      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (2)
renovate.json (2)
94-94: Scope infra/test automerge to both main and release branchesThis now applies only to release branches, regressing prior behavior that included
main. If that narrowing wasn’t intended, include both branches (and fix the pattern).Apply this diff:
- "matchBaseBranches": ["release/*"], + "matchBaseBranches": ["main", "/^release\\/.*/"],
75-79: Avoid duplicate patch PRs to main (add an explicit disable rule)With both
mainandrelease/*as base branches, patch updates will still be proposed tomainunless explicitly disabled. Add a rule to turn off patch PRs tomain, keeping patches confined to release branches as intended.Proposed addition (insert near these rules):
+ { + "description": "Don't create PRs to main branch for patch updates", + "matchUpdateTypes": ["patch"], + "matchBaseBranches": ["main"], + "enabled": false + },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
- renovate.json(3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{json,yml,yaml}
📄 CodeRabbit inference engine (CLAUDE.md)
Indent JSON and YAML with 2 spaces
Files:
- renovate.json
2e8f2e7    to
    f8542d1      
    Compare
  
    | { | ||
| "description": "Minor/major updates go to main branch", | ||
| "matchUpdateTypes": ["minor", "major"], | ||
| "matchBaseBranches": ["main"], | ||
| "automerge": true | ||
| }, | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this rule should also be converted to something with enabled: false. If I understand it correctly, match* properties just match dependencies and then we can change their options. This rule probably just enables automerge for minor and major versions targeted to main
f8542d1    to
    00c9b46      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
- renovate.json(3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{json,yml,yaml}
📄 CodeRabbit inference engine (CLAUDE.md)
Indent JSON and YAML with 2 spaces
Files:
- renovate.json
🔇 Additional comments (3)
renovate.json (3)
9-9: Correct use of baseBranchPatterns (regex for release/*) — LGTMRegex is valid here and will pick up all release/* branches as intended. Note: enabling release branches means all existing rules now apply to them unless scoped. Consider scoping the EAP automerge rule (Lines 13–27) to main only if you don’t want EAPs on release branches.
Reference: baseBranchPatterns supports exact and regex; matchBaseBranches supports regex within packageRules. (docs.renovatebot.com)
Example scope for the EAP rule (apply inside that rule):
"matchBaseBranches": ["main"]
70-74: Patches disabled on main — aligns with goalThis cleanly routes patch updates away from main.
94-94: Rule now applies only to release/ — confirm intent*If you also want these test/infra deps to automerge on main, include it explicitly.
Optional tweak:
- "matchBaseBranches": ["/^release\\/.*/"], + "matchBaseBranches": ["main", "/^release\\/.*/"],
        
          
                renovate.json
              
                Outdated
          
        
      | { | ||
| "description": "Minor/major updates go to main branch", | ||
| "matchUpdateTypes": ["minor", "major"], | ||
| "matchBaseBranches": ["main"], | ||
| "automerge": true | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid automerging major updates; also block minor/major on release branches
Automerge of majors on main is high‑risk. Recommend: automerge only minor on main; keep majors manual. Also explicitly disable minor/major on release/* to ensure “others → main” is enforced.
Apply within this rule:
-      "description": "Minor/major updates go to main branch",
-      "matchUpdateTypes": ["minor", "major"],
+      "description": "Minor updates go to main branch (automerge)",
+      "matchUpdateTypes": ["minor"],Add these additional rules nearby:
{
  "description": "Major updates go to main branch (no automerge)",
  "matchUpdateTypes": ["major"],
  "matchBaseBranches": ["main"],
  "automerge": false
},
{
  "description": "Disable minor/major updates on release branches",
  "matchUpdateTypes": ["minor", "major"],
  "matchBaseBranches": ["/^release\\/.*/"],
  "enabled": false
}🤖 Prompt for AI Agents
In renovate.json around lines 75-79 the rule currently automerges both minor and
major updates to main; change it to only matchUpdateTypes ["minor"] with
automerge true, then add two new rules nearby: one matching ["major"] on
["main"] with automerge false, and another matching ["minor","major"] on base
branch pattern /^release\/.*/ with "enabled": false to disable those updates on
release branches.
| 
 Yes, every week or two. We could automate creating a PR or even doing the merge. I was also thinking we could include a tag for PRs into main that will automatically cherry-pick to release for any bug fixes that are targeted to main, wdyt? | 
2221945    to
    826401e      
    Compare
  
    826401e    to
    ec4a2e7      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
renovate.json (1)
76-80: Fix branch matcher: use regex for release/*"release/*" isn’t valid for matchBaseBranches; use a regex so the rule actually applies.
Apply:
- "matchBaseBranches": ["release/*"], + "matchBaseBranches": ["/^release\\/.*/"],
🧹 Nitpick comments (1)
renovate.json (1)
94-94: Scope check: infra/test automerge now only on release branchesAdding matchBaseBranches limits automerge to release/*; main no longer matches. If that’s intended, ignore. If you want both, include main.
Optional diff:
- "matchBaseBranches": ["/^release\\/.*/"], + "matchBaseBranches": ["main", "/^release\\/.*/"],
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
- renovate.json(3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{json,yml,yaml}
📄 CodeRabbit inference engine (CLAUDE.md)
Indent JSON and YAML with 2 spaces
Files:
- renovate.json
🔇 Additional comments (2)
renovate.json (2)
70-74: LGTM: disables patch updates on main as intendedMatches the “patches → release” goal. Renovate won’t create patch PRs to main.
9-9: No changes needed:baseBranchPatternsis supported
Renovate accepts exact names and regexes inbaseBranchPatterns, so the current config is correct.Likely an incorrect or invalid review comment.
This should map patches to release and others to main.