Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix github webhook payload detection logic #728

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chakrit
Copy link

@chakrit chakrit commented Jun 25, 2023

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)

The correct value for "package_type" seems to be "CONTAINER" instead of
"docker"
@chakrit
Copy link
Author

chakrit commented Jun 25, 2023

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.

@joebowbeer
Copy link
Contributor

joebowbeer commented Aug 1, 2023

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

Additional references:

@bard bard mentioned this pull request Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants