octokit / webhooks.net

GitHub webhook events toolset for .NET
MIT License
48 stars 31 forks source link

[BUG]: The package_type of a webhook typed PackageEvent throw an ArgumentException #462

Closed renardguill closed 4 months ago

renardguill commented 4 months ago

What happened?

The value of field package_type of a GitHub webhook typed PackageEvent is 'NUGET' (in uppercase). But in sources of Octokit.Webhooks the value is 'nuget' (in lowercase). https://github.com/octokit/webhooks.net/blob/de882f63afa22c3dd777e46b9095458ab9f2da20/src/Octokit.Webhooks/Models/PackageType.cs#L14

This mismatch throw a ArgumentException :

System.ArgumentException: Value 'NUGET' is not a valid 'PackageType' enum value.
   at Octokit.Webhooks.Extensions.StringEnum`1.ParseValue()

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

Versions

Octokit.Webhooks v2.1.0

Relevant log output

No response

Code of Conduct

github-actions[bot] commented 4 months ago

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀