keel icon indicating copy to clipboard operation
keel copied to clipboard

Fix github webhook payload detection logic

Open chakrit opened this issue 2 years ago • 3 comments

The correct value for "package_type" seems to be "CONTAINER" instead of "docker"

I'm not sure how the original author came up with the value "docker", perhaps that was deprecated/obsoleted by GitHub sometime ago? The documentation at https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#registry_package doesn't mention anything about potential values.

This was a quick-fix to make GitHub webhook works again but I think if there's time, we should change the detection code to be a bit more robust w/r to GitHub changes (i.e. checks on a well-documented key instead)

chakrit avatar Jun 25 '23 18:06 chakrit

Also it looks like you need the "Repositories" permission on the webhook too, otherwise it seems the repository key will not be sent on the webhook payload.

chakrit avatar Jun 25 '23 18:06 chakrit

Also change event type s/package_v2/package/ and this will fix #713

Additional references:

  • https://github.com/octokit/webhooks/pull/747
  • https://github.com/google/go-github/issues/2033
  • https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#package

joebowbeer avatar Aug 01 '23 05:08 joebowbeer

Still not merged ?

Ketlark avatar Jul 30 '24 09:07 Ketlark