Skip to content

[WIP] Experiment on getting GitHub Packages packages correct casing #1855

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

o-l-a-v
Copy link
Contributor

@o-l-a-v o-l-a-v commented Aug 11, 2025

PR Summary

Just experimenting on getting correct casing of GitHub Packages packages.

Far from done, just an idea on how one could get correct casing on GitHub Packages NuGet v3 packages.

It builds, and I've tested it against NuGet organization package NuGet.Internal.GithubIssueTagger:

PS > Save-PSResource -TrustRepository -Path ([System.Environment]::GetFolderPath('Desktop')) -Verbose -Repository 'gh-nuget' -Name 'NuGet.Internal.GithubIssueTagger'

VERBOSE: Setting Secret Management network credentials
VERBOSE: credential successfully read from vault and set for repository: gh-nuget
VERBOSE: Attempting to search for packages in 'gh-nuget'
VERBOSE: Performing the operation "Save-PSResource" on target "Package to save: 'nuget.internal.githubissuetagger', version: '2025.4.30'".
VERBOSE: Performing the operation "Save-PSResource" on target "Package to install: 'nuget.internal.githubissuetagger', version: '2025.4.30'".
VERBOSE: This resource is not a PowerShell package and will be installed to the modules path: .
VERBOSE: pkgName: "nuget.internal.githubissuetagger", actual name of nuspec file: "NuGet.Internal.GithubIssueTagger.nuspec"
VERBOSE: Installation source path is: 'C:\Users\<redacted>\AppData\Local\Temp\fb55f6b9-3acb-445c-8b5b-3e14e3e57537\nuget.internal.githubissuetagger\2025.4.30'
VERBOSE: Installation destination path is: 'C:\Users\<redacted>\Desktop\nuget.internal.githubissuetagger\2025.4.30'
VERBOSE: Attempting to move 'C:\Users\<redacted>\AppData\Local\Temp\fb55f6b9-3acb-445c-8b5b-3e14e3e57537\nuget.internal.githubissuetagger\2025.4.30' to 'C:\Users\<redacted>\Desktop\nuget.internal.githubissuetagger\2025.4.30'
VERBOSE: Successfully installed package 'nuget.internal.githubissuetagger' to location 'C:\Users\<redacted>\Desktop'
VERBOSE: Attempting to delete 'C:\Users\<redacted>\AppData\Local\Temp\fb55f6b9-3acb-445c-8b5b-3e14e3e57537'
VERBOSE: Successfully deleted 'C:\Users\<redacted>\AppData\Local\Temp\fb55f6b9-3acb-445c-8b5b-3e14e3e57537'

PS >

See verbose line about pckName vs actual name of nuspec file.

The API returns package ID as lowercase (see #1446 (comment)), so the idea is to extract the .nupkg and get info from its' content.

So, we can work around / mitigate / fix the casing of the install path this way, but the output from Find-PSResource will be lowercase, because that's what the API returns.

PR Context

PR Checklist

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.

1 participant