← ClaudeAtlas

git-pr-finalizelisted

Finalize a GitHub PR end-to-end - watch CI and Copilot review, address findings, merge after confirmation, and clean up branches
tatsushige-i/shared-claude-code · ★ 0 · Code & Development · score 63
Install: claude install-skill tatsushige-i/shared-claude-code
# PR Finalize Skill Orchestrate the post-PR workflow end-to-end: watch CI checks and Copilot review, address findings, merge after user confirmation, and clean up branches. This skill is an **orchestrator**. It does not re-implement comment handling or branch cleanup; it reuses existing skills: - **`git-review-respond`** — analyze review comments, fix code, commit, and reply - **`git-branch-cleanup`** — worktree-scoped local cleanup (`main`/`develop` protected) The skill focuses on **monitoring + completion judgment + merge** only. ## Steps ### Step 1: Determine PR Number - If `$ARGUMENTS` is specified as a number, use that PR number - If `$ARGUMENTS` is empty (no argument), infer the PR from the current branch: - Run `gh pr view --json number,state,headRefName,title,url` (resolves the PR associated with the current branch) - If a PR is found, announce it and use that PR number: ```text Using PR #XX associated with the current branch `<branch>`. ``` - If no PR is found (the command fails, or the current branch has no PR), fall back to asking the user for the PR number: ```text Could not detect a PR from the current branch. Please provide the PR number you'd like to finalize. ``` - If `$ARGUMENTS` is specified but is not a number, ask the user for the PR number: ```text Please provide the PR number you'd like to finalize. ``` - If a clear number cannot be determined from the user's response, exit with an error. Do not guess or m