/gaac:close-pr <pr-number>from gaac
Merges a pull request after validating it's open, non-draft, conflict-free, and CI-green, then updates and closes related issues.
Ships in gaac. Installing the plugin adds it to Claude Code.
Merge a pull request with validation checks (non-draft, CI green) and update all related issues.
gh repo view --json nameWithOwner -q '.nameWithOwner'if [ -z "$1" ]; then
echo "Error: PR number required"
echo "Usage: /close-pr <pr-number>"
exit 1
fi
gh pr view $1 --json number,state,title 2>/dev/null || {
echo "Error: PR #$1 not found"
exit 1
}
gh pr view $1 --json title,state,isDraft,mergeable,mergeStateStatus,statusCheckRollup,headRefName,baseRefName,url
Check the following conditions:
If any condition fails: Display error and stop.
If CI checks are pending: Display warning and stop. User should wait for CI to complete or manually merge if needed.
bash "${CLAUDE_PLUGIN_ROOT}/skills/github-manager/scripts/merge-pr.sh" \
--pr $1
The script will:
gh pr merge --$STRATEGY --delete-branchIf merge fails: Display error and stop.
bash "${CLAUDE_PLUGIN_ROOT}/skills/github-manager/scripts/update-related-issues.sh" \
--pr $1
This will:
Resolves #N, Fixes #N, Closes #N patterns| Item | Status |
|---|---|
| PR | #$1 merged |
| Strategy | |
| Branch | |
| Issues resolved | #N, #M, ... |
| Issues notified | #X, #Y, ... |
If the PR has merge conflicts:
/close-prIf CI checks are failing:
/close-prIf merge fails with permission error:
gaac.merge_strategy in gaac.mdsquash if not configuredWhat the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub sihaoliu/gaac --plugin gaac10 commands in this plugin
/cancel-loop-codex-reviewCancel Loop with Codex ReviewCancel active loop-with-codex-review/git-commit/git-commitCreate a git commit following GAAC format with proper tags and issue references/loop-with-codex-reviewLoop with Codex ReviewStart iterative loop with Codex review/plan-arch-to-issues/plan-arch-to-issuesConvert implementation plans into test-driven GitHub issues/refine-spec-to-arch/refine-spec-to-archRefine draft specifications into architecture documents and implementation plans/research-idea-to-spec/research-idea-to-specTransform ideas into draft specifications with multi-source researchOther plugins' commands for the same job