Skip to content

Commit

Permalink
Fix: Nuget PackageEvent (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
renardguill authored Feb 29, 2024
1 parent de882f6 commit 18d2b70
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Octokit.Webhooks/Models/PackageType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public enum PackageType
RubyGems,
[EnumMember(Value = "docker")]
Docker,
[EnumMember(Value = "nuget")]
[EnumMember(Value = "NUGET")]
NuGet,
[EnumMember(Value = "CONTAINER")]
Container,
Expand Down
2 changes: 1 addition & 1 deletion src/Octokit.Webhooks/Models/PackageVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public sealed record PackageVersion
public IDictionary<string, dynamic>? NpmMetadata { get; init; }

[JsonPropertyName("nuget_metadata")]
public IDictionary<string, dynamic>? NugetMetadata { get; init; }
public IEnumerable<PackageVersionNugetMetadata>? NugetMetadata { get; init; }

[JsonPropertyName("rubygems_metadata")]
public IDictionary<string, dynamic>? RubygemsMetadata { get; init; }
Expand Down
14 changes: 14 additions & 0 deletions src/Octokit.Webhooks/Models/PackageVersionNugetMetadata.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace Octokit.Webhooks.Models;

[PublicAPI]
public sealed record PackageVersionNugetMetadata
{
[JsonPropertyName("name")]
public string? Name { get; init; }

[JsonPropertyName("id")]
public string? Id { get; init; }

[JsonPropertyName("value")]
public dynamic? Value { get; init; }
}

0 comments on commit 18d2b70

Please sign in to comment.