Push webhook payload is inexplicable


We’ve got push webhooks turned on at the org level and I’m trying to find detailed docs for what payload github will send on commit push.

This doesn’t seem to exist! Instead, the events API tells us that the PushEvent available through that API has a body that differs significantly from what the webhook itself will provide. It doesn’t explain what the webhook does send though, just gives a big JSON example.

This really isn’t good enough for me to understand what my webhook handler needs to do. For example, what is base_ref? When will it not be null? What is created? When will it be true? What can cause the commits list to be empty, but the head_commit to be non-null?