Skip to content

Commit db5775b

Browse files
committed
#842 set Publisher to owner if available otherwise author
Signed-off-by: James Thompson <thompson.tomo@outlook.com>
1 parent 7375ec2 commit db5775b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

CycloneDX/Services/NugetV3Service.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ private static Component SetupComponentProperties(Component component, NuspecMod
289289
var title = nuspecModel.nuspecReader.GetTitle();
290290
var summary = nuspecModel.nuspecReader.GetSummary();
291291
var description = nuspecModel.nuspecReader.GetDescription();
292+
var owner = nuspecModel.nuspecReader.GetOwners();
292293
if (!string.IsNullOrEmpty(summary))
293294
{
294295
component.Description = summary;
@@ -301,6 +302,14 @@ private static Component SetupComponentProperties(Component component, NuspecMod
301302
{
302303
component.Description = title;
303304
}
305+
if (!string.IsNullOrEmpty(owner))
306+
{
307+
component.Publisher = owner;
308+
}
309+
else
310+
{
311+
component.Publisher = component.Author;
312+
}
304313

305314
return component;
306315
}

0 commit comments

Comments
 (0)