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(nuget): adds package source mapping and generate cached NuGet.config without CLI commands #25052
feat(nuget): adds package source mapping and generate cached NuGet.config without CLI commands #25052
Conversation
7fdd50d
to
2118bb0
Compare
Is it correctly understood that with this MR, I can only configure packageSourceMapping via a nuget.conf file -that must reside in the individual repo's ? |
Correct |
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
I am using renovate on-prem for 100+ repos and I would really like if there was any way that I could use this with a centralized config 🙏 |
Is there currently a feature in renovate where you can centralize this configuration for all repos? If so, I can have a look to make this compatible with it. But wouldn't it be weird to update your dependencies with a different configuration than the developers that are running/merging it? |
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Missing code coverage |
There was no test for reading nuget.config files, I added it now. That should do the trick |
still missing coverage |
Head branch was pushed to by a user without write access
A line handling unnamed package sources was partially covered, I changed a test to include this case. |
🎉 This PR is included in version 37.27.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Caused a regression: |
…nfig without CLI commands (renovatebot#25052) Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Changes
This changes the way the cached nuget config gets generated, it no longer runs CLI commands to add sources but generates a NuGet.config XML using the
createNuGetConfigXml
inside the config-formatter.ts file. This was done so it can support packageSourceMapping which cannot be set using the CLI commands.The getConfiguredRegistries now also picks up any package patterns that are mapped to a repository.
Context
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via:
Test run on a real repo
The resulting PR