go-playground / webhooks

:fishing_pole_and_fish: Webhook receiver for GitHub, Bitbucket, GitLab, Gogs
MIT License
956 stars 237 forks source link

handle gitlab system hook inconsistencies #111

Closed aritas1 closed 4 years ago

aritas1 commented 4 years ago

This PR handles the inconsistencies for gitlab system hook keys to the project webhook keys.

All system hooks (except the merge_request) have different naming for the object defining key: object_kind vs. event_name

I added some test data from the official documentation (version 12.10) for the system events and added handling for the event_name keys.

Due to the possibility? that some odd/old version was emitting object_kind keys for the events, i left the old handling in place.