Skip to content

Include action in webhook test payloads

Luke Duncalfe requested to merge ld-webhooks-add-action-to-test-data into master

What does this MR do and why?

Include action in webhook test payloads #468397 (closed).

Previously a webhook test would not include the object_attributes.action part of an issue, or MR, payload. This was because it was assigned only when really executed.

This change includes the action to the webhook tests.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. Create a project webhook:
    1. Choose a project, go Settings > Webhooks.
    2. For URL use https://webhook.site to generate a new webhook receiving URL.
    3. For Trigger, select Issues events and Merge requests events.
    4. Select Add webhook.
  2. Test your webhooks: 2. Go Settings > Webhooks, find your webhook and click Edit.
    1. Scroll down, and click Test, and choose Issues events .
    2. Visit your https://webhook.site URL and you should receive a webhook with an object_attributes.action property ("opened").
    3. Note click Test, and choose Merge requests events, you should also receive a webhook with an object_attributes.action property ("opened")..
  3. QA that normal issue and MR webhooks are unaffected
    1. Go to Issues > List, and choose an issue to close.
    2. Visit your https://webhook.site URL and you should receive a webhook with an object_attributes.action property.
    3. Go to Merge requests > List, and choose an MR to close.
    4. Visit your https://webhook.site URL and you should receive a webhook with an object_attributes.action property.
Edited by Luke Duncalfe

Merge request reports