-
Notifications
You must be signed in to change notification settings - Fork 696
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
Sort package vulnerability advisories by severity in descending order #4175
Conversation
...ients/NuGet.VisualStudio.Internal.Contracts/ContextInfos/PackageSearchMetadataContextInfo.cs
Outdated
Show resolved
Hide resolved
This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 7 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch. |
...ients/NuGet.VisualStudio.Internal.Contracts/ContextInfos/PackageSearchMetadataContextInfo.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Models/V3DetailControlModelTests.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Models/V3DetailControlModelTests.cs
Outdated
Show resolved
Hide resolved
This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 7 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch. |
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/DetailControlModel.cs
Show resolved
Hide resolved
test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Models/V3DetailControlModelTests.cs
Outdated
Show resolved
Hide resolved
test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Models/V3DetailControlModelTests.cs
Outdated
Show resolved
Hide resolved
0b63615
to
2bc3d3b
Compare
2f7c7b4
to
f83d6cb
Compare
f83d6cb
to
96698ab
Compare
Bug
Fixes: NuGet/Home#11091
Regression? Last working version: N/A
Description
Sort the list of vulnerabilities when the PackageSearchMetadataContextInfo is created so the list is cached in order and already in order whenever it is used. Since the list is in order with the highest severity vulnerability at the top, calculate the maximum severity by looking at the first vulnerability to save on computation time of checking for the max in the list.
PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation