Skip to content

Commit

Permalink
#842 set Publisher to owner if available otherwise author
Browse files Browse the repository at this point in the history
Signed-off-by: James Thompson <[email protected]>
  • Loading branch information
thompson-tomo committed Jan 29, 2024
1 parent 7375ec2 commit db5775b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CycloneDX/Services/NugetV3Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ private static Component SetupComponentProperties(Component component, NuspecMod
var title = nuspecModel.nuspecReader.GetTitle();
var summary = nuspecModel.nuspecReader.GetSummary();
var description = nuspecModel.nuspecReader.GetDescription();
var owner = nuspecModel.nuspecReader.GetOwners();
if (!string.IsNullOrEmpty(summary))
{
component.Description = summary;
Expand All @@ -301,6 +302,14 @@ private static Component SetupComponentProperties(Component component, NuspecMod
{
component.Description = title;
}
if (!string.IsNullOrEmpty(owner))
{
component.Publisher = owner;
}
else
{
component.Publisher = component.Author;
}

return component;
}
Expand Down

0 comments on commit db5775b

Please sign in to comment.