channable / hoff

A gatekeeper for your commits
Apache License 2.0
41 stars 3 forks source link

Do not crash on review_requested event #21

Open duijf opened 4 years ago

duijf commented 4 years ago

GitHub sends webhook events for PRs with "action": "review_requested". Those currently trigger 500 responses from Hoff.

I think we might be able to fix this by bumping the version of our github dependency. The latest version seems to support it: https://hackage.haskell.org/package/github-0.24/docs/GitHub-Data-PullRequests.html#t:PullRequestEventType

duijf commented 4 years ago

@ruuda told me offline that Hoff uses a handwritten parser, so we can add support for this ourselves.

ruuda commented 4 years ago

There are types and FromJSON instances in https://github.com/channable/hoff/blob/master/src/Github.hs. I think the type you link to in the GitHub package is for the part of the API that manages webhooks.