github-api
github-api copied to clipboard
Webhook payloads and Event payloads should not be represented by the same classes
Webhooks and events contain similar data but often not the same data. The Push event is one example: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push https://docs.github.com/en/developers/webhooks-and-events/events/github-event-types#pushevent
There's a lot of overlap, but having the two represented by the same data objects is misleading.
See #1374 for an example of the confusion this causes.
We should be returning different classes for these two.