New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(repo/changelogs): allow user configuration of source url #16873
feat(repo/changelogs): allow user configuration of source url #16873
Conversation
- revert changes in release-notes.ts cache keys
Shouldn't the cache namespace be related to datasource and not manager? |
probably, as the source url is being set in the datasource stage. |
Yes I think if you're making changes then now is a good time. Let's consider if other fields need changing too |
I think this might be deeper than just changing to I mean we can asset not null (! operator) but im not sure its entirely true at runtime edit: on second thought, this might not be a problem renovate/lib/workers/repository/update/pr/changelog/source-github.ts Lines 36 to 42 in e4dbd4a
|
other namespaces and cache keys GitHub
renovate/lib/workers/repository/update/pr/changelog/source-github.ts Lines 122 to 125 in e4dbd4a
GitLab
renovate/lib/workers/repository/update/pr/changelog/source-gitlab.ts Lines 97 to 99 in e4dbd4a
Release notes
renovate/lib/workers/repository/update/pr/changelog/release-notes.ts Lines 394 to 399 in e4dbd4a
renovate/lib/workers/repository/update/pr/changelog/release-notes.ts Lines 60 to 62 in e4dbd4a
renovate/lib/workers/repository/update/pr/changelog/release-notes.ts Lines 271 to 273 in e4dbd4a
renovate/lib/workers/repository/update/pr/changelog/release-notes.ts Lines 394 to 399 in e4dbd4a
|
now using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it's only used for changelogs, shouldn't we name it customChangelogUrl
? and use that if set in changelogs?
you mean to change all i guess it depends on how many places we are using |
yes, but only in changelogs. |
maybe also needs |
those should then passt to all functions in changelogs, so they are evaluated once, like platform detection |
im not that familiar with this flow, do you mean thats why in the POC i used the same dependency, one repo uses a custom url and the next uses the default one and there was no interference between them |
It would be nice if we can overcome the barriers to reusing all our existing field names, rather than defining each one again |
…/github.com/Gabriel-Ladzaretti/renovate into 16011-Allow_user_configuration_of_sourceUrl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see other comments
Co-authored-by: Rhys Arkins <rhys@arkins.net>
c60dbb4
to
2397fed
Compare
🎉 This PR is included in version 32.172.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changes
Introduces a new config option named
overwriteSourceUrl
which is valid within thePackageRules
object only (not enforced, a warning message will be logged).When set, this
url
will be used as the source of changelogs retrieval.This
url
is now passed a function parameter to bothgetChangeLogJSON
functions.Cache namespace
changelog-github/github-release
which is used for caching theCompare Source
links. which is originally structured as -manager:depname:prevVer:nextVer
,will now also contain the, is nowrepository/pathname
to prevent conflicts + usedatasource
instead ofmanager
as part of the key.sourceUrl:depname:prevVer:nextVer
.Note:sourceUrl
is restored to its original value after changelog retrieval, this is due the fact that it is part of therepository cache
. and if im not mistaken changelogs has no meaning in the context of repository cache but the original datasource fetchedsourceUrl
does.Context
closes #16011
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: