How to set minimumGroupSize/groupSingleUpdates/etc for a built-in group?
#44529
-
How are you running Renovate?A Mend.io-hosted app Which platform you running Renovate on?GitHub.com Which version of Renovate are you using?43.259.2 Please tell us more about your question or problemThere are certain options which only make sense in the group context, like I could not find a way, however, to set these options for a built-in group. For example, let's say I want to set {
"packageRules:" [
{
"extends": ["group:jacksonMonorepo"],
"minimumGroupSize": 5
}
]
}I would have expected it to work, but config-validator rejects it with Logs (if relevant)No response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
Why it doesn't work
{
packageRules: [
{
extends: [`monorepo:${monorepo}`], // e.g. monorepo:jackson
groupName: `${monorepo} monorepo`,
matchUpdateTypes: nonPinUpdateTypes,
},
],
}So when you put That's what the you should not extend The fix Build the rule yourself from the
{
"packageRules": [
{
"extends": ["monorepo:jackson"],
"groupName": "jackson monorepo",
"minimumGroupSize": 5
}
]
}That produces the identical group to |
Beta Was this translation helpful? Give feedback.
-
|
Something like {
"extends": "config:recommended", // brings jackson monorepo
"packageRules": [
{
"matchGroupName": "jackson monorepo",
"minimumGroupSize": 5
}
]
} |
Beta Was this translation helpful? Give feedback.
Why it doesn't work
group:jacksonMonorepo:- it's a preset whose body is apackageRulesarray{ packageRules: [ { extends: [`monorepo:${monorepo}`], // e.g. monorepo:jackson groupName: `${monorepo} monorepo`, matchUpdateTypes: nonPinUpdateTypes, }, ], }So when you put
"extends": ["group:jacksonMonorepo"]inside apackageRule, Renovate tries to merge apackageRulesarray into a single package rule.packageRulesnested inside apackageRule, which doesn't make sense.That's what the you should not extend
"group:"presets warning is guarding against.The fix
Build the rule yourself from the
monorepo:presetmonorepo:jacksonis just match criteria (matchSourceUrls