REST API: Unknown event type 'PullRequestReviewEvent'

Recently the REST API (in my case, specifically the repository events API [1]) has started sending out events of type ‘PullRequestReviewEvent’, which aren’t documented in the docs [2]. Can those events be documented?

Additionally, the payload of those events (see here for an example) seems to contain a an ‘action’ field (a string), a ‘pull_request’ field (a PullRequest object as returned by the PR API [3]), and a ‘review’ field (a Review object as returned by the review API [4]) … except the returned review object differs from the review API response by capitalization of the ‘state’ field (review API e.g. returns ‘APPROVED’, while the event returns ‘approved’). Can the events API be fixed to be consistent to the review API there?

(NB: Sorry for email-style linking and non-clickability of the links, but I wasn’t allowed to add more than 2 links to the post otherwise and I felt they’re needed for clarity)

Links all under docs.github.com:
[1] en/rest/reference/activity#list-repository-events
[2] en/developers/webhooks-and-events/github-event-types
[3] en/rest/reference/pulls#list-pull-requests
[4] en/rest/reference/pulls#get-a-review-for-a-pull-request

1 Like

Additionally, what are the possible values for ‘action’?