Skip to content

Add custom payload template to webhooks

What does this MR do and why?

This adds the ability to create a custom webhook payload template using mustache-like syntax.

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.

Screenshots or screen recordings

image

How to set up and validate locally

  1. bin/rails runner "Feature.enable(:custom_webhook_template)"
  2. Open https://public.requestbin.com/r and copy the endpoint url
  3. Create a new webhook and use the copied url
  4. Add a custom webhook template (for example: {"event":"{{object_kind}}"})
  5. Save the webhook
  6. Test the webhook and check the requestbin for the incoming request (check that the body is {"event":"push"} for example)

Related to #362504 (closed)

Edited by Niklas van Schrick

Merge request reports