-
Notifications
You must be signed in to change notification settings - Fork 643
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
Add fuget.org links to packages #8364
Conversation
FYI @chgill-MSFT @anangaur |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -163,6 +163,12 @@ public DisplayPackageViewModelFactory(IIconUrlProvider iconUrlProvider) | |||
viewModel.ProjectUrl = projectUrl; | |||
} | |||
|
|||
var fugetUrl = $"https://www.fuget.org/packages/{package.Id}/{package.Version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the "full version" or the "normalized version"? We should use the normalized version because that includes all URL safe characters. The build metadata is included in the full and original, non-normalized version strings. So 1.0.0+foo
is a valid version but we only want 1.0.0
in the URL. To be safe, it's best to use URL encoding methods to build this URL so you don't have to think about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it to NormalizedVersion
. Thanks!
[Theory] | ||
[InlineData("foo", "1.0.0", "https://www.fuget.org/packages/foo/1.0.0")] | ||
[InlineData("foo", "1.1.0", "https://www.fuget.org/packages/foo/1.1.0")] | ||
[InlineData("foo.bar", "1.1.0-beta", "https://www.fuget.org/packages/foo.bar/1.1.0-beta")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add uppercase package IDs and versions as well as versions with build metadata to assert the respective behaviors
Addresses: #7850
Packages will now have an additional link per specs outlined here: #7832, linking to the package's fuget.org view.