-
Notifications
You must be signed in to change notification settings - Fork 495
Add PSM entry to example nuget.config #3508
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
base: main
Are you sure you want to change the base?
Conversation
Added package source mapping for specific package sources.
|
Learn Build status updates of commit d1865ff: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
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.
Pull Request Overview
This PR adds Package Source Mapping (PSM) configuration to the example nuget.config file, demonstrating how to enforce that certain packages only come from specific package sources.
Key Changes
- Added a
packageSourceMappingsection to the example configuration showing how to map package patterns to specific sources - Demonstrates mapping ES.* packages to "MyRepo - ES" source and all other packages to the official NuGet source
| <packageSource key="MyRepo - ES"> | ||
| <package pattern="ES.*" /> | ||
| </packageSource> | ||
| <packageSource key="NuGet official package source"> | ||
| <package pattern="*" /> | ||
| </packageSource> |
Copilot
AI
Nov 15, 2025
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.
The indentation of the packageSourceMapping child elements is inconsistent with the rest of the example configuration file. The <packageSource> and <package> elements should use 4 spaces of indentation to match the indentation style used in other sections like <config> and <packageSources>. Currently, these lines appear to use 2 spaces instead of 4.
| <packageSource key="MyRepo - ES"> | |
| <package pattern="ES.*" /> | |
| </packageSource> | |
| <packageSource key="NuGet official package source"> | |
| <package pattern="*" /> | |
| </packageSource> | |
| <packageSource key="MyRepo - ES"> | |
| <package pattern="ES.*" /> | |
| </packageSource> | |
| <packageSource key="NuGet official package source"> | |
| <package pattern="*" /> | |
| </packageSource> |
Added package source mapping for specific package sources.
I often reference this example config and was surprised to not see PSM config in it.