Open iphydf opened 7 years ago
Hm, I guess I misunderstood the meaning of "events" here. I thought it was supposed to be useful for events posted by github webhooks. Instead, it seems to be for timeline events. This issue can be ignored then.
The two kinds of events overlap. As you've probably seen, I haven't updated the package in a while, and I didn't keep up with the changes in the GitHub API. If it makes sense to keep the definition of events unified across the different sources (webhook, timeline, ...) then this issue is valid.
Actually, if you look at the documentation there is http://hackage.haskell.org/package/github-types-0.2.1/docs/GitHub-Types-Events.html#v:webhookPayloadParser.
They overlap, but the timeline events contain a lot less data. You'll end up having lots of Maybe a
in the records. I started contributing back my work, but it's going to take more than an hour to unify timeline events and webhook events, so here is my code: https://github.com/TokTok/github-tools/tree/master/web/GitHub/Types/Events and https://github.com/TokTok/github-tools/tree/master/web/GitHub/Types/Base.
Ah, that's a shame :( If they are distinct enough then we should keep the types separate.
I get the following error when receiving a "push" event from GitHub:
ParseError "Error in $: key \"size\" not present"
.This is a sample JSON event body: