← ClaudeAtlas

github-pr-mergelisted

Merges GitHub Pull Requests after validating pre-merge checklist. Use when user wants to merge PR, close PR, finalize PR, complete merge, approve and merge, or execute merge. Runs pre-merge validation (tests, lint, CI, comments), confirms with user, merges with proper format, handles post-merge cleanup.
fvadicamo/dev-agent-skills · ★ 63 · Code & Development · score 83
Install: claude install-skill fvadicamo/dev-agent-skills
# GitHub PR merge Merges Pull Requests after validating pre-merge checklist and handling post-merge cleanup. ## Current PR !`gh pr view --json number,title,state -q '"PR #\(.number): \(.title) (\(.state))"' 2>/dev/null` ## Core workflow ### 1. Check comments status Verify all review comments have at least one reply: ```bash REPO=$(gh repo view --json nameWithOwner -q '.nameWithOwner') PR=$(gh pr view --json number -q '.number') # Find unreplied comment IDs gh api repos/$REPO/pulls/$PR/comments --jq ' [.[] | select(.in_reply_to_id) | .in_reply_to_id] as $replied | [.[] | select(.in_reply_to_id == null) | select(.id | IN($replied[]) | not) | .id] ' ``` **If unreplied comments exist:** - **STOP** the merge process - Inform user: "Found unreplied comments: [IDs]. Run github-pr-review first." - **NEVER** reply to comments from this skill ### 2. Check milestone ```bash gh pr view $PR --json milestone -q '.milestone.title // "none"' ``` - If milestone is assigned: include it in the checklist summary (step 3) - If no milestone: check for open milestones and warn the user ```bash gh api repos/$REPO/milestones --jq '[.[] | select(.state=="open")] | length' ``` If open milestones exist but the PR has none, surface a warning in the checklist: `- Milestone: ⚠ not assigned (open milestones exist)` Do NOT block the merge for a missing milestone. It is a warning only. ### 3. Run validation Run tests, linting, and verify CI checks. All **MUST** pass before proceeding. ``