From db5775b517d2b0d9764cf12cd0d740f0643d9079 Mon Sep 17 00:00:00 2001 From: James Thompson Date: Tue, 30 Jan 2024 08:39:57 +1100 Subject: [PATCH] #842 set Publisher to owner if available otherwise author Signed-off-by: James Thompson --- CycloneDX/Services/NugetV3Service.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CycloneDX/Services/NugetV3Service.cs b/CycloneDX/Services/NugetV3Service.cs index 923eba4d..223ba38e 100644 --- a/CycloneDX/Services/NugetV3Service.cs +++ b/CycloneDX/Services/NugetV3Service.cs @@ -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; @@ -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; }