github-api
github-api copied to clipboard
`GHEventPayload` should not contain `repository` as a root level property
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.
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.".