Skip to content

Commit

Permalink
CycloneDX#842 add in properties for metadata etc
Browse files Browse the repository at this point in the history
  • Loading branch information
thompson-tomo committed Jan 30, 2024
1 parent da4a179 commit bc9818c
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion CycloneDX/Services/NugetV3Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ private static Component SetupComponentProperties(Component component, NuspecMod
{
component.Publisher = component.Author;
}

var releaseNoteType = "internal";
var version = nuspecModel.nuspecReader.GetVersion();
if (version.IsPrerelease)
Expand Down Expand Up @@ -344,6 +344,25 @@ private static Component SetupComponentProperties(Component component, NuspecMod
}
]
};

var properties = nuspecModel.nuspecReader.GetMetadata()
.Select(x => new Property()
{
Name = x.Key,
Value = x.Value
})
.ToList();
properties.Add(new Property()
{
Name = "tags",
Value = nuspecModel.nuspecReader.GetTags(),
});
properties.Add(new Property()
{
Name = "language",
Value = nuspecModel.nuspecReader.GetLanguage()
});
component.Properties = properties;
return component;
}

Expand Down

0 comments on commit bc9818c

Please sign in to comment.