Skip to content

Add API for trigger group test webhook

  • Please check this box if this contribution uses AI-generated content as outlined in the GitLab DCO & CLA

What does this MR do and why?

  • Add API for trigger group test webhook
  • Refactor trigger test webhook to module
  • Refactor test to shared example

Connected to Allow triggering group test webhooks via API (#455589 - closed)

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

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Setup webhook on your group

  2. Trigger test webhook by. (Trigger type is one of [push_events, tag_push_events, issues_events, confidential_issues_events, note_events, merge_requests_events, job_events pipeline_events, wiki_page_events deployment_events, feature_flag_events releases_events, emoji_events, resource_access_token_events]

    curl --request POST \
      --url http://gdk.test:3000/api/v4/groups/<GROUP_ID>/hooks/<HOOK_ID>/test/<TRIGGER_TYPE> \
      --header 'PRIVATE-TOKEN: <PERSONAL_ACCESS_TOKEN>'
Edited by 🤖 GitLab Bot 🤖

Merge request reports