GitLab
Receive GitLab issue and merge request events in Plural
A GitLab webhook delivers issues, work items, merge requests, and merge request comments from GitLab into Plural. Each one becomes an issue record in Plural that a workbench can act on. You can register the webhook on a project or on a group.
An event does not start a job by itself. A job starts only when a webhook trigger on a workbench matches the item, and only when the item has just become open: a new open issue, merge request, or comment, or a closed one that was reopened. Edits to an item that is already open do not start another job, and the same item starts at most one job per workbench in an hour.
This webhook is separate from the SCM webhook Plural uses for pull request automation and Flows. See SCM webhooks and PR linking for that one.
What Plural reads from the payload
Plural picks the event from the payload's object_kind. It accepts four kinds and acknowledges and ignores everything else, including comments on issues, commits, and snippets.
object_kind | Recorded as | Title | Body | Link |
|---|---|---|---|---|
issue | The issue | Issue title | Description | url |
work_item | The work item, such as a task, epic, or incident | Work item title | Description | url |
merge_request | The merge request | Merge request title | Description | url |
note on a merge request | A separate item per comment | Comment on MR: <title> (#<note id>) | Comment text | Comment URL |
GitLab sends ordinary issues and Service Desk issues as issue and other work item types as work_item. Title, description, iid, and state come from object_attributes, falling back to the current value in changes when a field is missing.
Plural identifies each item by project path (project.path_with_namespace) and iid, or by note ID for comments, so later events for the same item update the existing record instead of creating a new one. An empty description is stored as {empty}, and bodies longer than 10,000 characters are truncated.
A trigger matches against the title and body joined by a newline. Because a comment's title includes the merge request title, a trigger that matches text in a merge request title also matches every comment on that merge request.