renovate
renovate copied to clipboard
Support filters for `lockFileMaintenance` to update only defined files
What would you like Renovate to be able to do?
I have multiple package-lock.json
files in my project. However, I want that renovate bot will update only one of them. Therefore, I would like to have a filter attribute for lockFileMaintenance
, which allows to define which files should be updated and which should be ignored.
In my case, the reason is that some of my package-lock.json
files have dependencies to generated OpenAPI packages, which are only present when running a Maven command before lockFileMaintenance
. As renovate cannot execute Maven commands, I want to exclude all related package-lock.json
files.
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"lockFileMaintenance": {
"enabled": true
// Update "project-a/package-lock.json`, but ignore "project-b/package-lock.json`
}
}
I have created a minimal reproduction repository: https://github.com/pmwmedia/lock-file-maintenance-reproduction-repo
Originally, I posted my use case in the discussion section (#18936). There, rarkins has recommended to open a feature request.
If you have any ideas on how this should be implemented, please tell us here.
Is this a feature you are interested in implementing yourself?
No
We maybe need a boolean setting like refreshLockFiles
to control this, so that it's not tied to lockFileMaintenance.enabled
Hello,
Just checking whether this is a stale request as I'm looking for the same thing, this is still not possible as of today, right?
You can maybe exclude files using https://docs.renovatebot.com/configuration-options/#excludecommitpaths but I'm not sure if it can be customized down to the branch/update or if it won't cause other side effects
We'd like to filter lock file maintenance, but at the manager level. So far I haven't figured out a good way to accomplish this.