← ClaudeAtlas

mergelisted

Merge GitHub PR into main w/ release-ready commit message. Triggers when user mentions merging PR, landing branch, shipping GitHub PR. Phrasings: "merge this", "land the PR", "merge PR #N".
kborovik/pilot-skills · ★ 4 · Code & Development · score 73
Install: claude install-skill kborovik/pilot-skills
Merge current branch's PR → main w/ release-note-ready commit message. ## Process 1. **Identify PR:** - $ARGUMENTS provided → use as PR number - Else current branch's PR: `gh pr view --json number,title,body,url` - ⊥ PR → inform user ∧ exit 2. **Verify ready to merge:** - Remote status: - `gh pr checks` — CI status - `gh pr view --json mergeable` — merge conflicts - `gh pr view --json reviewDecision` — review approval - `gh pr view --json isDraft` — draft status - ⊥ ready (failing checks, conflicts, missing reviews) → inform user of blockers ∧ exit 2.5. **Push gate** (decision-gate per decision-gate invariant — worked example: mid-flow consequence-bearing prompt before squash-merge ∴ unpushed local commits ⊥ merged): - Compute unpushed commit count: `git rev-list --count "origin/<branch>..HEAD"` (`<branch>` ≡ current branch). - `N == 0` → skip gate, proceed to §3. - `N > 0` → emit AskUserQuestion call: - **question**: `Push N unpushed commits before merge?` - **options** (3 — mutually exclusive, label ≡ action description): - `Push ∧ continue` → `git push origin <branch>` then §3 - `Force-push ∧ continue` → `git push --force-with-lease origin <branch>` then §3 - `Cancel` → exit w/ no merge - **header**: `Push gate` - prose `reply ok/cancel` form ⊥ allowed — selection drives remote-branch state change per decision-gate invariant. 3. **Analyze changes:** - All commits: `gh pr view --json