depNameSanitized contains spurious characters #31555
-
What would you like help with?I think I found a bug How are you running Renovate?Self-hosted If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.Bitbucket Data Center v8.19.6; Renovate 38.82.1 Reproduced on Github with Mend Renovate 39.107.0 Please tell us more about your question or problemWith the copier manager,
Without special handling (which seems finicky given different URL schemas for diferent platforms) and no further information (I'm not aware of a "template name" in copier template metadata, unfortunately), Renovate can not do a whole lot better; it create:
Needless to say, those are not very nice and hard to read, let alone parse at a glance. So I tried to improve them, expecting the following package rule to produce nicer output: {
matchManagers: [
"copier",
],
branchTopic: "copier-template-{{{replace 'https-.*?-scm-([^.]+)\\.git' '$1' depNameSanitized}}}-{{{newVersion}}}",
commitMessageTopic: "copier template {{{replace 'https:.*?/scm/([^.]+)\\.git' '$1' depName}}}",
}, In particular, the pattern for
✅ The pattern for
➡️ Reproducing MWE at reitzig/reproduction-renovate-31555 Extensive trial and error led to us inspecting
🚨 Note Workaround:
To me, this seems like a "just needs a unit test"-kind-of-issue. Please let me know if you require a full-blown reproduction repo. :)
Logs (if relevant)Logs
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi there, Get your discussion fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. Discussions without reproductions are less likely to be converted to Issues. Please follow these steps:
If you need help with running renovate on your minimal reproduction repository, please refer to our Running Renovate guide. The Renovate team |
Beta Was this translation helpful? Give feedback.
-
The purpose of sanitization is to remove special characters, not pretty up or shorten a depName. I think we could/should strip out the https://docs.renovatebot.com/configuration-options/#overridedepname allows you to override |
Beta Was this translation helpful? Give feedback.
#33672