stable

Clone or download

Read-only

Refactoring: use HTTP header to check webhook type

This is part of request #20918 GitLab tags that contains a reference to Tuleap should be backlinked Webhook content changed with breaking changes. "event_type" key was renamed to "object_kind" and "event_name" key is not in all webhook payload. So we now use the request header "X-Gitlab-Event" to distinguish webhook type. Change-Id: I5b30eae01ce716a7d4edcf2d5ba67de07e1fbfc8

Modified Files

Name
M plugins/gitlab/include/Repository/GitlabRepositoryWebhookController.php +2 −2 Go to diff View file
R plugins/gitlab/include/Repository/Webhook/MissingEventKeysException.php Go to diff View file
M plugins/gitlab/include/Repository/Webhook/WebhookDataExtractor.php +32 −30 Go to diff View file
M plugins/gitlab/tests/unit/Repository/Webhook/PostMergeRequest/PostMergeRequestWebhookDataBuilderTest.php +7 −7 Go to diff View file
M plugins/gitlab/tests/unit/Repository/Webhook/PostPush/PostPushWebhookDataBuilderTest.php +2 −3 Go to diff View file
M plugins/gitlab/tests/unit/Repository/Webhook/WebhookDataExtractorTest.php +40 −63 Go to diff View file