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

`GHEventPayload` should not contain `repository` as a root level property

Open Haarolean opened this issue 1 year ago • 1 comments

Probly a candidate for a breaking change for v2: GHEventPayload probably should not contain repository as a root level property as it might not be present in every webhook payload. An example would be installation event, which is evident from org/kohsuke/github/GHEventPayloadTest/installation.json contents.

Haarolean avatar Dec 16 '23 18:12 Haarolean

The same applies to installation field, one can be missing from some payloads, e.g. sponsorship. Github docs still contains these fields, and the only "warning" is this part of the description: "Webhook payloads contain the repository property when the event occurs from activity in a repository.".

image

Haarolean avatar Dec 16 '23 19:12 Haarolean