github-api icon indicating copy to clipboard operation
github-api copied to clipboard

Webhook payloads and Event payloads should not be represented by the same classes

Open bitwiseman opened this issue 3 years ago • 0 comments

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.

bitwiseman avatar Feb 15 '22 04:02 bitwiseman