gitlab_merge_mr
Merges a GitLab merge request by IID after verifying merge_status, handling conflicts or pipeline issues.
Instructions
Perform the actual merge if GitLab reports the MR can be merged.
Destructive: writes to the target branch. Checks merge_status first
and returns status='cannot_merge' if conflicts exist or pipelines are
required.
Examples:
- "Merge !42" → mr_iid=42
- Don't call without checking gitlab_get_merge_request first when you suspect conflicts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mr_iid | Yes | Merge request IID to merge. | |
| project_path | No | GitLab project path (e.g. 'my-org/my-repo'). When omitted, the default from GITLAB_PROJECT_PATH env var is used. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| iid | No | ||
| title | No | ||
| state | No | ||
| source_branch | No | ||
| target_branch | No | ||
| merge_status | No | ||
| has_conflicts | No | ||
| web_url | No | ||
| status | No | ||
| hint | No |