Skip to content

[BUG]: A webhook typed PackageEvent with a nuget_metadata field throw an JsonException #460

@renardguill

Description

@renardguill

What happened?

A webhook typed PackageEvent with a nuget_metadata field throw an JsonException

The type of nuget_metadata field in Octokit.Webhooks is IDictionary<string, dynamic>?

public IDictionary<string, dynamic>? NugetMetadata { get; init; }

But in the GitHub documentation the type of nuget_metadata is array of objects or null
https://docs.github.com/en/webhooks/webhook-events-and-payloads#package

Below a reproducible test case on dotnetfiddle.com
https://dotnetfiddle.net/CeroqZ

Versions

Octokit.Webhooks v2.1.0

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is being looked at and prioritizedType: BugSomething isn't working as documented

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions