Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tools/installPSResources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ param(
[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.
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.
}

# NOTE: Due to a bug in Install-PSResource with upstream feeds, we have to
Expand Down
Loading