gitlab_close_merge_request
Close a GitLab merge request without merging it, useful for abandoning changes or deferring work. Automatically updates the MR to a closed state, allowing it to be reopened later. Requires the merge request number (IID).
Instructions
Close merge request without merging Returns: Updated MR with closed state Use when: Abandoning changes, deferring work Note: Can be reopened later
Related tools:
gitlab_update_merge_request: Reopen or other updates
gitlab_merge_merge_request: Merge instead
Input Schema
Name | Required | Description | Default |
---|---|---|---|
mr_iid | Yes | Merge request number (IID - Internal ID) Type: integer Format: Project-specific MR number (without !) Required: Yes Examples: - 456 (for MR !456) - 7890 (for MR !7890) How to find: Look at MR URL or title - URL: https://gitlab.com/group/project/-/merge_requests/456 → use 456 - Title: "Add new feature (!456)" → use 456 Note: This is NOT the global MR ID | |
project_id | No | Project identifier (auto-detected if not provided) Type: integer OR string Format: numeric ID or 'namespace/project' Optional: Yes - auto-detects from current git repository Examples: - 12345 (numeric ID) - 'gitlab-org/gitlab' (namespace/project path) - 'my-group/my-subgroup/my-project' (nested groups) Note: If in a git repo with GitLab remote, this can be omitted |