一键导入
gh-batch-merge-by-labels
Batch merge multiple PRs by label (e.g., all 'ready-to-merge' PRs). Use when you have multiple approved PRs to merge.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Batch merge multiple PRs by label (e.g., all 'ready-to-merge' PRs). Use when you have multiple approved PRs to merge.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run section orchestrators to coordinate multi-component workflows. Use when starting work on a section.
Validate agent YAML frontmatter and configuration. Use before committing agent changes or in CI.
Reply to PR review comments using the correct GitHub API endpoint. Use when responding to inline code review feedback (not gh pr comment).
Run Mojo tests using mojo test command. Use when executing tests or verifying test coverage.
Track implementation progress against plan. Use to monitor component delivery and identify blockers.
Check agent configuration coverage across hierarchy levels and phases. Use to ensure complete agent system coverage.
| name | gh-batch-merge-by-labels |
| description | Batch merge multiple PRs by label (e.g., all 'ready-to-merge' PRs). Use when you have multiple approved PRs to merge. |
| category | github |
Merge multiple PRs at once based on label matching.
# List PRs with specific label
gh pr list --label "ready-to-merge" --state open
# Merge single PR
gh pr merge <pr> --squash --delete-branch
# Get PR numbers for batch merge
gh pr list --label "ready-to-merge" --json number --jq '.[].number'
# Merge all PRs with label (requires loop)
for pr in $(gh pr list --label "ready-to-merge" --json number --jq '.[].number'); do
gh pr merge "$pr" --squash --delete-branch
done
Squash Merge (recommended):
--squash flag enables thisCreate Merge Commit:
--squashRebase and Merge:
--rebase flag enables thisBefore batch merging:
Report batch merge results with:
| Problem | Solution |
|---|---|
| CI failing | Skip that PR, check analyze-ci-failure-logs |
| Merge conflict | Resolve manually, cannot batch merge |
| No permissions | Check gh auth status and repo access |
| Branch protection | Verify all required rules met |
| Network error | Retry with exponential backoff |