Skip to content

Revert CFS feed for PSResources#2277

Merged
andyleejordan merged 1 commit intomainfrom
nuget-auth
Apr 8, 2026
Merged

Revert CFS feed for PSResources#2277
andyleejordan merged 1 commit intomainfrom
nuget-auth

Conversation

@andyleejordan
Copy link
Copy Markdown
Member

So annoying.

Copilot AI review requested due to automatic review settings April 8, 2026 22:40
@andyleejordan andyleejordan merged commit 28e1aa5 into main Apr 8, 2026
9 checks passed
@andyleejordan andyleejordan deleted the nuget-auth branch April 8, 2026 22:40
Copy link
Copy Markdown
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

Note

Copilot was unable to run its full agentic suite in this review.

Updates the CFS PSResource repository registration to point at a different ADO feed, to work around OneBranch authentication limitations.

Changes:

  • Added an inline note explaining why the project-scoped feed can’t be used in OneBranch.
  • Updated the Register-PSResourceRepository URI for the CFS repository to a different Azure DevOps feed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

[string]$PSRepository = "PSGallery"
)

# Install-PSResource can't use the project-scoped feed because OneBranch doesn't auth it
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new URI still appears to be a project-scoped Azure DevOps feed (just in a different org/project). The comment as written reads like a blanket limitation on project-scoped feeds, which could mislead future maintainers. Recommend updating the comment to describe the specific limitation (e.g., OneBranch doesn’t authenticate the msazure/One feed or a particular feed scope) and why this new feed is expected to work.

Suggested change
# Install-PSResource can't use the project-scoped feed because OneBranch doesn't auth it
# Install-PSResource can't use the previously referenced msazure/One feed because
# OneBranch does not authenticate that feed in this environment. For CFS, register
# the powershell/PowerShell PowerShellGalleryMirror feed instead, which is expected
# to be accessible here.

Copilot uses AI. Check for mistakes.
# Install-PSResource can't use the project-scoped feed because OneBranch doesn't auth it
if ($PSRepository -eq "CFS" -and -not (Get-PSResourceRepository -Name CFS -ErrorAction SilentlyContinue)) {
Register-PSResourceRepository -Name CFS -Uri "https://pkgs.dev.azure.com/msazure/One/_packaging/PowerShellGalleryMirror/nuget/v3/index.json"
Register-PSResourceRepository -Name CFS -Uri "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShellGalleryMirror/nuget/v3/index.json"
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The feed URL is hardcoded inline, which makes future feed moves harder and increases the chance of similar scripts diverging. Consider extracting the URI into a single variable/constant near the top of the script (or allowing an override via a parameter/environment variable) so this can be updated in one place.

Copilot uses AI. Check for mistakes.
@andyleejordan andyleejordan added Issue-Enhancement A feature request (enhancement). Area-Build & Release Issue-Bug A bug to squash. and removed Issue-Enhancement A feature request (enhancement). labels Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants