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

Enhancement: ParseEventPayload: Parse the event type automatically #1646

Open
Haarolean opened this issue Apr 24, 2023 · 1 comment
Open

Comments

@Haarolean
Copy link
Contributor

Hi, I noticed the following documentation on GitHub#parseEventPayload:

[...] Unfortunately, hook script payloads aren't self-descriptive, so you need to know the type of payload you are expecting.

As far as I see, the event type is present within x-github-event header of the incoming hook request.

As stated here:
image

I've checked the request and the event name does really match the ones available on the aforementioned page.

Could we match the event type strings to GHEventPayload implementations so we don't have to provide the type?

P.S. Thanks for the great library! ❤️

@Haarolean
Copy link
Contributor Author

I might be able to raise a PR if you're interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants