Skip to content

Different headers to distinguish live from test webhooks

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

In my humble opinion webhook sends invalid data for the X-Gitlab-Event and thus it's not possible to distinguish between test and live events. As far as I understand, webhook should send two different header values for test and live events. For example, for live push events it should send Push Event in the header and for the test push events it should send Push Hook in the header.

This is noticed in following versions: CE 10.2.4 and CE 10.3.1

Steps to reproduce

  1. Create a project or use existing one.
  2. Setup a push webhook for it.
  3. Trigger a test push event from the dropdown menu.
  4. Make a commit and push it.
  5. Go to webhooks recent deliveries and check "Trigger" column where you will see the same values for test and live events.

What is the current bug behavior?

Webhook sends the same value for the X-Gitlab-Event header for test and live events. Below is the example of header values received for live events:

  • Push Hook when it should be Push Event
  • Merge Request Hook when it should be Merge Request Event
  • and so on ...

What is the expected correct behavior?

Webhook should send the correct header value.

Edited by 🤖 GitLab Bot 🤖