一键导入
close-gitlab-mr
Merge and close GitLab merge requests with glab after provider-specific pipeline gating, draft readiness, merge, and local cleanup.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Merge and close GitLab merge requests with glab after provider-specific pipeline gating, draft readiness, merge, and local cleanup.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Resume and execute implementation work from a plan-tracking GitHub issue that carries issue-hosted source, plan, and execution-state snapshots, preserving progress on the issue when local docs/plans files may be cleaned up.
Use when the user wants to open or continue a GitHub issue as the durable timeline for a discovered problem, investigation, blocker, implementation handoff, or unresolved follow-up loop.
Finalize and close plan-tracking GitHub issues after issue-backed execution is complete and the user or project policy has approved closure.
Open or preview a provider-aware GitHub or GitLab tracking issue for a docs/plans plan bundle, bootstrapping the source doc and plan first when the user has a converged feature discussion but no plan file yet.
Deliver a dispatch-ready plan by sprint: split plan tasks into PR lanes, dispatch subagent work, enforce acceptance gates, and advance through final integration without main-agent implementation.
Close out an existing plan-issue runtime where main-agent owns orchestration and review only, subagents own implementation task lanes, and close gates require approval plus merged PRs.
| name | close-gitlab-mr |
| description | Merge and close GitLab merge requests with glab after provider-specific pipeline gating, draft readiness, merge, and local cleanup. |
Prereqs:
git, glab, and python3 available on PATH, and glab auth status succeeds for the target host.git status --porcelain=v1 is empty).Inputs:
kind=feature|bug|config|deploy|docs|chore.--mr is omitted.code-review-specialists.--poll-seconds <n>, --max-wait-seconds <n>, --skip-pipeline, and --allow-no-pipeline.--remove-source-branch, --squash, and --sha <commit>.--keep-local-branch and --no-cleanup.Outputs:
--allow-no-pipeline.glab mr update <mr> --ready --yes before merge.glab mr merge.--remove-source-branch is supplied.--keep-local-branch or
--no-cleanup is supplied.Exit codes:
0: success1: workflow blocked/failure (dirty tree, missing pipeline without explicit allow, failed pipeline, non-open MR, merge failure,
command failure)2: usage error124: pipeline wait timeoutFailure modes:
--allow-no-pipeline was not supplied.glab mr update --ready fails.glab/git permissions are insufficient.$AGENT_HOME/skills/workflows/mr/gitlab/close-gitlab-mr/scripts/close-gitlab-mr.shdeliver-gitlab-mr runs the mandatory shared delivery specialist
review gate before invoking this close workflow. Keep this direct close gate
optional so existing MR close/cleanup requests do not become implicit review
orchestration.close-gitlab-mr.sh for final merge and cleanup; the
close helper has no review flag.glab mr view, then use the MR
target branch as the code-review-specialists diff base.code-review-specialists read-only: do not post MR comments, fix code,
mark the MR ready, merge, or clean up from that workflow.code-review-specialists scope and skip rules unless the user
forced a specialist or all specialists.Shared delivery gate reference:
skills/workflows/_shared/references/DELIVERY_SPECIALIST_REVIEW_GATE.md
Resolve MR metadata
glab mr view.Run optional user-requested review
Gate on GitLab pipeline
close-gitlab-mr.sh --kind <kind> --mr <iid>close-gitlab-mr.sh --kind <kind> --mr <iid> --allow-no-pipeline--allow-no-pipeline only accepts a missing pipeline. It must not bypass failed, skipped, blocked, manual, pending, or
unknown pipeline states.--skip-pipeline is reserved for explicit user-confirmed cases where the pipeline gate should not run at all.--skip-pipeline.Mark ready and merge
glab mr update <mr> --ready --yes automatically.glab mr merge <mr> --yes.--remove-source-branch, --squash, and --sha <commit> only when explicitly supplied.Cleanup
origin/<target>, fast-forward the
local target branch, and delete the local source branch unless cleanup is
disabled.origin/<target> for local branch deletion.kind=feature: use for feature MRs originally created by create-gitlab-mr.kind=bug: use for bugfix MRs originally created by create-gitlab-mr.kind=docs: use for documentation-only MRs originally created by create-gitlab-mr.kind=config|deploy|chore: use for operational/configuration MRs originally created by create-gitlab-mr.deliver-gitlab-mr.