How to identify what event triggered a github webhook (pr, push, issue etc)

Viewed 923

Looking at the docs, each event has a "Webhook event name", but that doesn't seem to be sent in the payloads of the webhooks.

If you create a webhook that listens to multiple events, how (besides duck typing) would you be able to differentiate which event was the one that triggered the hook?

1 Answers

Check the header X-GitHub-Event, as documented here

Related