Skip to content

Conversation

@baronfel
Copy link

Added package source mapping for specific package sources.

I often reference this example config and was surprised to not see PSM config in it.

Added package source mapping for specific package sources.
Copilot AI review requested due to automatic review settings November 15, 2025 18:13
@baronfel baronfel requested review from a team as code owners November 15, 2025 18:13
@learn-build-service-prod
Copy link

Learn Build status updates of commit d1865ff:

✅ Validation status: passed

File Status Preview URL Details
docs/reference/nuget-config-file.md ✅Succeeded View

For more details, please refer to the build report.

@learn-build-service-prod
Copy link

PoliCheck Scan Report

The 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 found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

Copilot finished reviewing on behalf of baronfel November 15, 2025 18:14
Copy link
Contributor

Copilot AI left a 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 packageSourceMapping section 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

Comment on lines +501 to +506
<packageSource key="MyRepo - ES">
<package pattern="ES.*" />
</packageSource>
<packageSource key="NuGet official package source">
<package pattern="*" />
</packageSource>
Copy link

Copilot AI Nov 15, 2025

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.

Suggested change
<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>

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants