What's the logic for packageRules conditions? #8116
-
I'm trying to prevent major updates for a certain package in a certain app of a monorepo: packageRules: [
{
updateTypes: ["major", "minor", "patch", "digest"],
automerge: true,
},
{
paths: ["apps/silverback-drupal/composer.json"],
packageNames: [
"drupal/core",
],
major: {
enabled: false,
},
}
], According to the docs
Not sure if this is applied to my case as well. I would like the rule to work only if both |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Yes. The docs you quote refer to But don't nest |
Beta Was this translation helpful? Give feedback.
-
Thank you for the superfast reply! Will do. Also some feedback: For me it was (and still is) quite hard to understand Renovate config options. The docs are full of examples, but sometimes it isn't clear which option is a condition and which is a setting. Wouldn't it make sense to split them? For example: packageRules: [
{
conditions: {
paths: [
"apps/silverback-drupal/composer.json",
],
packageNames: [
"drupal/core",
],
},
settings: {
updateTypes: [
"minor",
"patch",
"digest",
],
},
},
], (I'm not familiar with all Renovate options/features. Just an idea 🙂) |
Beta Was this translation helpful? Give feedback.
-
Just to be sure, this would be the final config to do what i want?
|
Beta Was this translation helpful? Give feedback.
Yes. The docs you quote refer to
packageNames
andpackagePatterns
and not aboutpaths
.But don't nest
major
within the second rule. UseupdateTypes
instead, like you did in the first rule.