Allow custom npm registry URL for downloading Copilot from dotnet SDK#463
Open
nayanshah wants to merge 3 commits intogithub:mainfrom
Open
Allow custom npm registry URL for downloading Copilot from dotnet SDK#463nayanshah wants to merge 3 commits intogithub:mainfrom
nayanshah wants to merge 3 commits intogithub:mainfrom
Conversation
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds support for customizing the npm registry URL in the .NET SDK to accommodate organizations that use private npm registries. The SDK automatically downloads the Copilot CLI binary from npm during the build process, and this change makes the registry URL configurable via an MSBuild property.
Changes:
- Added
CopilotNpmRegistryUrlMSBuild property with a default value ofhttps://registry.npmjs.org - Updated the
_CopilotDownloadUrlproperty to use the configurable registry URL instead of the hardcoded public npm registry
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Author
|
@SteveSandersonMS thoughts? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Our repos enforce using private feeds and npm registry to fetch packages. But the .NET SDK attempts to download Copilot package from public npm registry.
This change allows customizing the registry url by defined a MSBuild property in the csproj or props file -
CopilotNpmRegistryUrl.Note: an improvement could be attempting to find and parse any existing
.npmrcfiles in any parent directories, but that ends up complicating this target a bit, so skipping for now