Add missing fields in Webhook events when using Test button
Summary
The payload for Webhook events are not consistent when using:
- actual event as trigger
- Test button as trigger
For the latter scenario, some fields like action
are missing which might cause issues with the receiving application.
Steps to reproduce
- Create a new project.
- Create a Webhook and select
Merge request events
as the `Trigger. - Create a dummy MR and observe a webhook event is created.
- Use the
Test
button in the webhook settings and observe another event is created.
Example Project
https://gitlab.com/kballon-bug-report/zd540601_webhook_action/-/hooks
What is the current bug behavior?
- The
action
field is missing from the payload.
What is the expected correct behavior?
- The
action
should be included in the payload.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)