chore(renovate): separate patch and minor updates for other dependencies#432
chore(renovate): separate patch and minor updates for other dependencies#432MaxLee-dev wants to merge 3 commits intomainfrom
Conversation
Separate "Other Dependencies" into two groups (patch and minor) to reduce PR complexity. Patch updates will auto-merge to improve efficiency. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary of ChangesHello @MaxLee-dev, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request streamlines dependency management by reconfiguring Renovate to differentiate between patch and minor updates for general dependencies. This change allows for automatic merging of low-risk patch updates, significantly reducing manual overhead, while ensuring that potentially impactful minor updates still undergo a manual review process to maintain system stability. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
.github/renovate.json
Outdated
| { | ||
| "description": "All other dependencies grouped together", | ||
| "groupName": "Other Dependencies", | ||
| "description": "Group patch updates for other dependencies", | ||
| "groupName": "Other Dependencies (patch)", | ||
| "matchUpdateTypes": ["patch"], | ||
| "automerge": true, | ||
| "labels": ["type: dependencies"], | ||
| "matchPackageNames": ["*"], | ||
| "excludePackageNames": [ | ||
| "react", | ||
| "react-dom", | ||
| "@types/react", | ||
| "@types/react-dom", | ||
| "/^@vanilla-extract\\/.*/", | ||
| "/^@base-ui-components\\/.*/" | ||
| ] | ||
| }, | ||
| { | ||
| "description": "Group minor updates for other dependencies", | ||
| "groupName": "Other Dependencies (minor)", | ||
| "matchUpdateTypes": ["minor"], | ||
| "automerge": false, | ||
| "matchPackageNames": [ | ||
| "*", | ||
| "!react", | ||
| "!react-dom", | ||
| "!@types/react", | ||
| "!@types/react-dom", | ||
| "!/^@vanilla-extract\\/.*/", | ||
| "!/^@base-ui-components\\/.*/" | ||
| "labels": ["type: dependencies"], | ||
| "matchPackageNames": ["*"], | ||
| "excludePackageNames": [ | ||
| "react", | ||
| "react-dom", | ||
| "@types/react", | ||
| "@types/react-dom", | ||
| "/^@vanilla-extract\\/.*/", | ||
| "/^@base-ui-components\\/.*/" | ||
| ] | ||
| } |
There was a problem hiding this comment.
excludePackageNames 목록이 "Other Dependencies (patch)"와 "Other Dependencies (minor)" 두 그룹에 동일하게 중복되어 있습니다.
이는 향후 유지보수 시 잠재적인 오류를 유발할 수 있습니다. 예를 들어, 새로운 패키지 그룹(예: lodash)을 추가하고 제외 목록을 갱신할 때, 두 곳 모두를 수정해야 합니다. 만약 한 곳이라도 누락되면 해당 패키지 업데이트가 의도치 않게 "Other Dependencies" 그룹에 포함될 수 있습니다.
Renovate의 JSON 설정 방식상 이 중복을 간단히 제거하기는 어렵지만, 이 구조를 인지하고 향후 제외 목록 변경 시 두 그룹을 항상 함께 수정하도록 주의가 필요합니다.
References
- 코드 리뷰 답변은 한국어로 제공해야 합니다. (link)
There was a problem hiding this comment.
The current approach requires manually updating the exclusion list (excludePackageNames) every time a new group is added.
Instead of adding defensive code as we do now, why not leverage Renovate's packageRules feature where later rules override earlier ones?
"packageRules": [
// 1. Overall Policy (Most Basic)
{
"description": "patch make auto PR, auto merge",
"matchUpdateTypes": ["patch"],
"automerge": true,
// ...
},
// ... (minor, major policy)
// 2. [Changed Location] 'Other Groups' Definition
// - Start with the most general ones
// - can completely remove the `excludePackageNames` attribute.
{
"description": "Group patch updates for other dependencies",
"groupName": "Other Dependencies (patch)",
"matchUpdateTypes": ["patch"],
"matchPackageNames": ["*"]
// delete `excludePackageNames`
},
{
"description": "Group minor updates for other dependencies",
"groupName": "Other Dependencies (minor)",
"matchUpdateTypes": ["minor"],
"matchPackageNames": ["*"]
// delete `excludePackageNames`
},
// 3. Specific group definition (special cases later -> overwriting effect)
{
"description": "React and React DOM",
"groupName": "React Core",
"matchPackageNames": ["react", "react-dom", ...]
// Here, the group is reassigned to React Core.
},
{
"groupName": "Vanilla Extract",
// ...
},
{
"groupName": "Base UI",
// ...
}
]…erate-minor-patch-renovate
Thank you for the excellent suggestion. Upon reviewing it myself, I found that 'renovate' can override previously defined rules. I have now completed the modification as per your proposed method, reflecting this behaviour. |
Summary
Motivation
Previously, all other dependencies were grouped into a single PR, which increased complexity and reduced efficiency when reviewing updates. By separating patch and minor updates:
Changes
automerge: trueautomerge: false