Skip to content

[Data Model Improvements] Add known owners capability - #6315

Merged
jgonz120 merged 2 commits into
dev-feature-PackageDomainModelfrom
dev-jgonz120-KnownOwnersCapability
Mar 13, 2025
Merged

jgonz120 merged 2 commits into
dev-feature-PackageDomainModelfrom
dev-jgonz120-KnownOwnersCapability

Conversation

@jgonz120

Copy link
Copy Markdown
Contributor

Bug

Fixes:

Description

Add known owners capability

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@jgonz120
jgonz120 requested a review from a team as a code owner March 13, 2025 17:34
@jgonz120
jgonz120 changed the base branch from dev to dev-feature-PackageDomainModel March 13, 2025 17:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request introduces a known owners capability for packages by mapping owner strings to structured KnownOwner objects with an associated details URL.

  • Added the KnownOwnersCapability class implementing the new IKnownOwnersCapable interface.
  • Introduced the IKnownOwnersCapable interface for packages with known owners.
  • Added comprehensive tests to verify the new behavior under various conditions.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/KnownOwnersCapability.cs Implements the known owners capability with support for null/empty owner lists and integration with the owner details URI service.
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/IKnownOwnersCapable.cs Introduces the interface for known owners capability.
test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Models/Package/KnownOwnersCapabilityTests.cs Adds tests covering various scenarios for the known owners feature.
Comments suppressed due to low confidence (2)

src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/KnownOwnersCapability.cs:29

  • The parameter 'ownersList' is declared as a non-nullable IReadOnlyList but is checked for null. Consider removing the null check or updating the parameter type if null values are expected.
if (ownersList is null || ownersList.Count == 0)

src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/IKnownOwnersCapable.cs:11

  • The IKnownOwnersCapable interface is declared without an access modifier. Consider making it public if it is intended for use outside of this assembly.
interface IKnownOwnersCapable

@jebriede jebriede left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! 🚀

@jgonz120
jgonz120 merged commit 846571f into dev-feature-PackageDomainModel Mar 13, 2025
@jgonz120
jgonz120 deleted the dev-jgonz120-KnownOwnersCapability branch March 13, 2025 21:41
jebriede pushed a commit that referenced this pull request Mar 24, 2025
* Add known owners capability

* Add access modifier
jebriede pushed a commit that referenced this pull request Apr 16, 2025
* Add known owners capability

* Add access modifier
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.

3 participants