Closed davidtheclark closed 6 years ago
I guess I'd rather just duck type 🤷♂️
The only other reasonable approach would be breaking, yes. If duck-typing isn't enough, then we just break it and include headers & body in the event pushed to the userland Lambda.
I guess it's a suggested "best practice" to determine your GitHub event type by looking at the
X-GitHub-Event
HTTP header (docs). Instead of duck typing.This isn't possible in a GH hookshot right now because the HTTP headers are not being passed to your Lambda — only the event body.
Unfortunately, I don't know how we could add that
X-GitHub-Event
information without a breaking change, since we'd need to change the data structure of theevent
that the Lambda receives. Any hot ideas?