gitlab_mr_update
Update a merge request's title, description, labels, assignee, milestone, or state. Set or clear draft status, change target branch, or toggle squash and discussion lock.
Instructions
Update a merge request. Pass draft to set or clear the "WIP: " prefix (when no title is given the current title is read first). labels:[] clears all labels and assignee_id:0 unassigns - omitting a field leaves it alone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| iid | Yes | project-scoped internal id - the number in !123 for a merge request or #123 for an issue, not the global id | |
| draft | No | set or clear the "WIP: " title prefix | |
| title | No | ||
| labels | No | replaces the whole label set; [] clears it | |
| squash | No | ||
| project | Yes | project id ('42') or full path ('group/subgroup/app'); a path is URL-encoded for you | |
| assignee_id | No | assignee numeric user id (find it with gitlab_users_search); 0 unassigns | |
| description | No | ||
| state_event | No | close or reopen the merge request | |
| milestone_id | No | 0 unassigns | |
| target_branch | No | branch name, e.g. feature/login | |
| discussion_locked | No | when locked, only project members can comment or resolve | |
| remove_source_branch | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| iid | No | internal id - the number in !123 | |
| sha | No | HEAD of the source branch | |
| state | No | opened / closed / locked / merged | |
| title | No | ||
| author | No | user reference | |
| labels | No | ||
| web_url | No | ||
| assignee | No | user reference | |
| milestone | No | ||
| project_id | No | ||
| description | No | ||
| merge_status | No | 'can_be_merged' / 'cannot_be_merged' / 'unchecked'. A merged merge request on 11.3 still reports can_be_merged, so read state first - merge_status alone is not a green light | |
| changes_count | No | a string on 11.3, not a number | |
| has_conflicts | No | not sent by 11.3; compare merge_status instead | |
| source_branch | No | ||
| target_branch | No | ||
| merge_commit_sha | No | ||
| user_notes_count | No | ||
| work_in_progress | No | 11.3 marks a draft MR this way; the title carries a "WIP: " prefix. Verified present on every one of 100 merge requests on the live instance |