Show webhook event types in the flow trigger form
What does this MR do and why?
Flow triggers can use four webhook event types: merge_request_hooks, issue_hooks, note_hooks and wiki_page_hooks. GraphQL lists them since !276892, but the trigger form did not. So you could only create these triggers through the API or the Rails console.
This MR shows them on the project Automations page, behind the ai_flow_trigger_webhook_events flag:
- The project controller pushes the flag to the frontend, scoped to the project.
- With the flag on, the "On an event" picker in the trigger form offers "Merge request events", "Issue events", "Comment events" and "Wiki page events". The Event type filter of the Automations list offers them too.
- The trigger list shows the name of these types. Before, it showed "Unknown".
- With the flag off, the form and the filter look the same as before.
- Group Automations pages do not push the flag, because it is a project flag. So the types never show there.
One edge case: if a trigger was saved with one of these types and the flag is then turned off, its condition row can still be opened. The type picker in that edit form is empty, because the type is hidden. Saving keeps the stored type, and the backend only blocks newly added webhook types, so no data is lost. This can only happen after a flag rollback or with triggers created through the API.
The types use the featureFlag key that getEnabledFlowTriggerTypes already reads. Because of that, the form and the condition picker needed no code change.
These types have no filter fields yet. You pick the type and that is it. Filter fields come in https://gitlab.com/gitlab-org/gitlab/-/work_items/644204.
This MR is stacked on !276892.
References
Closes https://gitlab.com/gitlab-org/gitlab/-/work_items/644205
Screenshots or screen recordings
| Flag off | Flag on |
|---|---|
![]() |
![]() |
| Saved automation in the Event list |
|---|
![]() |
How to set up and validate locally
- Pick a project where you can create flow triggers, and enable the flag for it in the Rails console:
Feature.enable(:ai_flow_trigger_webhook_events, Project.find_by_full_path('my-group/my-project')) - Open the project and go to Automate > Automations (
/<project>/-/automate/triggers). - Create a new automation. Pick a flow, then add a condition with "On an event". The list should include "Merge request events", "Issue events", "Comment events" and "Wiki page events". Pick "Merge request events". It has no extra fields.
- Save. Switch the list to "Event" automations. The new automation shows a "Merge request events" token. The Event type filter also lists the four types.
- Disable the flag:
Feature.disable(:ai_flow_trigger_webhook_events, Project.find_by_full_path('my-group/my-project')) - Reload the page. The four types are gone from the form picker and from the Event type filter.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.


