Closed HonkingGoose closed 3 years ago
You can define a package rule with allowedVersions to either allow only a pattern you want or disallow a pattern you don't.
I've not been able to get the regex working, I think I'm doing something wrong. The Renovate bot was complaining as well. I'm trying to match only the v2.0.0
release OR v2.0.0-alpha.69
releases.
{
"extends": ["config:base"],
"lockFileMaintenance": {
"enabled": true
},
"dependencyDashboard": true,
"packageRules": [
{
"packagePatterns": ["^@docusaurus"],
"allowedVersions": "/v2.0.0(-alpha.(\d\d)|)"
}
]
}
Because I could not get it working, I'm now using the dependencyDashboardApproval
workflow for the Docusaurus packages instead:
{
"extends": ["config:base"],
"lockFileMaintenance": {
"enabled": true
},
"dependencyDashboard": true,
"packageRules": [
{
"packagePatterns": ["^@docusaurus"],
"dependencyDashboardApproval": true
}
]
}
This is still not optimal, but it's the best that I could get going for now... π
wrong regex, try this:
{
"extends": ["config:base"],
"lockFileMaintenance": {
"enabled": true
},
"dependencyDashboard": true,
"packageRules": [
{
"packagePatterns": ["^@docusaurus"],
"allowedVersions": "/^v\\d+\\.\\d+\\.\\d+(-alpha\\.(\\d+))?$/"
}
]
}
edit: missing/more escape
Maybe you should better use followTag
{
"extends": ["config:base"],
"lockFileMaintenance": {
"enabled": true
},
"dependencyDashboard": true,
"packageRules": [
{
"packagePatterns": ["^@docusaurus"],
"followTag": "latest"
}
]
}
I think he's after next
tag, not latest
:
Problem is you then need to switch back from that config later once it hits 2.0.0 stable.
A simpler allowVersions could be !/(alpha|beta|rc)\.[a-z0-9]{7,}/
nope, you are on wrong npm package, he has https://www.npmjs.com/package/@docusaurus/core and https://www.npmjs.com/package/@docusaurus/preset-classic where the latest points to 2.0.0-alpha.69 π
OK, that's some unfortunately tagging then. I'd recommend to stick to allowedVersions
patterns considering that.
yeah, i think the docusaurus v2 package is a forward only package to pull in the new scoped packages
I'll try @viceice's better regex and see if that does the trick in filtering out the unwanted PRs. π€
I can confirm the new regex from @viceice is working. Jay! π
The Docusuaurus v2 project has made some new canary releases, and Renovate ignored those releases.
Closing this issue, as it seems to be resolved now. π Thanks for all the help and input!
Which Renovate are you using?
WhiteSource Renovate App
Which platform are you using?
GitHub.com
Have you checked the logs? Don't forget to include them if relevant
I don't think the logs are relevant for now.
What would you like to do?
Background
Docusaurus v2 are now publishing "canary" releases:
See PR 3827, at the Docusaurus GitHub repo to get the inside view on what they're doing there.
What I want
The new "canary" release process that Docusaurus uses causes Renovate to open a PR for those canary releases. These PRs eat into my build minutes for the website, and I don't want to have really rough dev-work in production anyways. I only want the mainline "human-approved" releases.
The pattern for the canary releases seems to be the same as for the normal releases, with the exception that they use a commit hash instead of a version number.
Versions I want/don't want
v2.0.0-alpha.69
orv2.0.0
v2.0.0-alpha.f37987f32
Example wanted PR:
https://github.com/RoostingGeese/git-gosling/pull/90
Example unwanted PRs:
https://github.com/RoostingGeese/git-gosling/pull/96 https://github.com/RoostingGeese/git-gosling/pull/95 https://github.com/RoostingGeese/git-gosling/pull/91
Main question:
I guess I'm looking for a regex that can filter out the unwanted branches...
It would be way cleaner if I could tell the Renovate bot to ignore the npm "canary" dist tag versions, but I haven't found this in the docs. I'm thinking that the ignore npm tagged version thing might also warrant a proper feature request at the
renovatebot/renovate
repository... πMy current config:
Copy/pasted from https://github.com/RoostingGeese/git-gosling/blob/main/renovate.json