From git
为 GitLab MR 创建新的 merge_request_event pipeline。当用户想重新触发 MR pipeline(如更新了 CI 模板后需要重跑、review job 需要重试等)时触发。支持 MR URL 或 IID 作为输入。注意:retry job 不会重新拉取 include 模板,必须创建新 pipeline。
npx claudepluginhub taptap/claude-plugins-marketplaceThis skill uses the workspace's default tool permissions.
为 GitLab MR 创建新的 `merge_request_event` pipeline。
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Automates semantic versioning and release workflow for Claude Code plugins: bumps versions in package.json, marketplace.json, plugin.json; verifies builds; creates git tags, GitHub releases, changelogs.
为 GitLab MR 创建新的 merge_request_event pipeline。
GitLab 的 include 模板在 pipeline 创建时拉取并缓存。Retry job 复用同一 pipeline 的缓存,不会重新拉取模板更新。只有创建新 pipeline 才能获取最新的模板内容。
从用户输入中提取 MR 信息:
| 输入 | 解析方式 |
|---|---|
| MR URL | 从 https://{host}/{namespace}/{project}/-/merge_requests/{iid} 提取 |
| MR IID | 从当前仓库 git remote get-url origin 推断 host 和 project |
# 从 URL 解析
HOST=$(echo "$MR_URL" | sed -E 's|https?://([^/]+)/.*|\1|')
PROJECT_PATH=$(echo "$MR_URL" | sed -E 's|https?://[^/]+/(.+)/-/merge_requests/.*|\1|')
MR_IID=$(echo "$MR_URL" | sed -E 's|.*/merge_requests/([0-9]+).*|\1|')
PROJECT_ENC=$(python3 -c "import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1],safe=''))" "$PROJECT_PATH")
glab api "projects/${PROJECT_ENC}/merge_requests/${MR_IID}" \
--hostname "$HOST" 2>/dev/null | python3 -c "
import json, sys
d = json.load(sys.stdin)
print(f'Title: {d[\"title\"]}')
print(f'Source: {d[\"source_branch\"]}')
print(f'Target: {d[\"target_branch\"]}')
print(f'SHA: {d[\"sha\"]}')
print(f'Pipeline: #{d.get(\"pipeline\",{}).get(\"id\",\"none\")} ({d.get(\"pipeline\",{}).get(\"status\",\"none\")})')
"
展示 MR 信息,确认后继续。
使用 GitLab Premium API 创建 merge_request_event 类型的 pipeline:
glab api "projects/${PROJECT_ENC}/merge_requests/${MR_IID}/pipelines" \
--hostname "$HOST" \
-X POST
关键点:
POST /projects/:id/merge_requests/:iid/pipelines — 创建 MR pipeline(merge_request_event)POST /projects/:id/pipeline -f ref=<branch> — 那是 push 类型 pipeline,不会触发 merge_request_event 规则的 job(如 .claude-reviewer)从 API 响应中提取 pipeline 信息:
# 解析响应
python3 -c "
import json, sys
d = json.load(sys.stdin)
print(f'✅ Pipeline #{d[\"id\"]} created')
print(f' Status: {d[\"status\"]}')
print(f' Source: {d[\"source\"]}')
print(f' URL: {d[\"web_url\"]}')
"
用 open 打开 pipeline URL。