Help us improve
Share bugs, ideas, or general feedback.
From gaac
Merges a pull request after validating its state (open, non-draft, CI green) and updates all related issues. Fails early if checks don't pass.
npx claudepluginhub sihaoliu/gaac --plugin gaacHow this command is triggered — by the user, by Claude, or both
Slash command
/gaac:close-pr <pr-number>This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# /close-pr Merge a pull request with validation checks (non-draft, CI green) and update all related issues. ## Context - Repository: !`gh repo view --json nameWithOwner -q '.nameWithOwner'` - PR number: $1 - Merge strategy: Configured in gaac.md (default: squash) --- ## Phase 0: Validation ### 0.1 Check Arguments ### 0.2 Verify PR Exists --- ## Phase 1: PR Status Check ### 1.1 Fetch PR Details ### 1.2 Validate PR State Check the following conditions: - PR is OPEN (not already merged or closed) - PR is NOT a draft - PR has no merge conflicts (mergeable != CONFLICTING) - CI...
/pr-finishBrings a PR to fully-green merged state by rebasing, fixing CI, resolving review threads, and merging with checks passing.
/pr-mergeMerges an approved pull request, deletes the feature branch, and optionally creates a release with user confirmation.
/fixprcAutonomously fixes PR comments, review feedback, merge-blocking issues, and CI problems using iterative genesis and copilot until PR is mergeable (max 7 iterations).
Share bugs, ideas, or general feedback.
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 configured