Przejdź do treści
Biblioteka skilli
Programowanie · Automatyzacja

merge-pr

/merge-pr

Scala gotowy pull request: sprawdza CI i recenzje, synchronizuje z gałęzią bazową, potwierdza z użytkownikiem, robi squash merge i sprząta, bez wdrażania na środowiska.

Repozytorium
harness-kit ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Scala gotowy pull request: sprawdza CI i recenzje, synchronizuje z gałęzią bazową, potwierdza z użytkownikiem, robi squash merge i sprząta, bez wdrażania na środowiska.

Wyzwalacze z opisu

merge thismerge this PRsquash mergemerge it
Oryginalny opis (EN)

Use when a pull request is ready to merge — verifies CI and review status, syncs with the base branch, confirms with the user, then squash merges and cleans up. Trigger when the user says "merge this", "merge this PR", "squash merge", or "merge it". Works on any open PR — does not require /open-pr to have created it. If no PR exists, redirects to /open-pr. Does NOT deploy to any environment.

Jak działa

  1. Step 1: Identify the PR
  2. Step 2: Verify Readiness
  3. Step 3: Base Branch Sync
  4. Step 4: Confirm with User
  5. Step 5: Squash Merge and Cleanup
  6. Quick Reference
  7. Rules
Sekcje z nagłówków SKILL.md, w oryginale · 127 linii, 491 słów
Podgląd SKILL.md
---
name: merge-pr
description: Use when a pull request is ready to merge — verifies CI and review status, syncs with the base branch, confirms with the user, then squash merges and cleans up. Trigger when the user says "merge this", "merge this PR", "squash merge", or "merge it". Works on any open PR — does not require /open-pr to have created it. If no PR exists, redirects to /open-pr. Does NOT deploy to any environment.
---

# Merge PR

Takes a ready PR and lands it: verify → sync → confirm → squash merge → cleanup.

**Announce at start:** "I'm using the merge-pr skill to merge this PR."

---

## Step 1: Identify the PR

Check for an open PR on the current branch, or use a user-specified PR number:

```bash
# Current branch
gh pr view --json number,title,url,state,baseRefName,headRefName 2>/dev/null

# Or if user specified #N:
gh pr view <N> --json number,title,url,state,baseRefName,headRefName
```

**No PR found:** Stop and redirect:
> "No open PR found on this branch. Use `/open-pr` to create one first."

**PR found:** Note the PR number, title, base branch, and URL. Continue.

---

## Step 2: Verify Readiness

Check CI status and review state:

```bash
gh pr checks <N>
gh pr view <N> --json reviews --jq '.reviews[] | select(.state == "CHANGES_REQUESTED")'
```

**CI failing:** Stop and report which checks are failing. Do not merge.
> "CI is failing on [check names]. Fix these before merging, or use `/open-pr` to address them."

**CHANGES_REQUESTED review:** Stop and report who requested changes.
> "PR has CHANGES_REQUESTED from [reviewer]. Resolve this before merging."

**All clear:** Continue.

---

## Step 3: Base Branch Sync

Check whether the base branch has moved since branching:

```bash
BASE=$(gh pr view <N> --json baseRefName --jq '.baseRefName')
git fetch origin $BASE
git log HEAD..origin/$BASE --oneline
```

**New commits exist:** Rebase and force-push:

```bash
git rebase origin/$BASE
git push --force-with-lease
```

If rebase has conflicts, resolve them, then `git rebase --continue`. After force-push, re-verify CI passes before continuing.

**No new commits:** Skip.

---

## Step 4: Confirm with User

Before merging, confirm:

```
Ready to squash merge PR #<N> ("<title>") into <base>.
All checks passed. Proceed?
```

Wait for confirmation. If the user says to always proceed without asking (e.g. "auto-merge", "no need to confirm"), skip this prompt for the rest of the session.

---

## Step 5: Squash Merge and Cleanup

Once confirmed:

```bash
gh pr merge <N> --squash --delete-branch
```

After merge, sync locally:

```bash
git checkout $BASE
git pull
git branch -d <feature-branch> 2>/dev/null || true
```

Report: "PR #<N> merged. Branch cleaned up. Done."

---

## Quick Reference

| Step | Action | Block on failure? |
|------|--------|-------------------|
| 1. Identify PR | Current branch or `#N` | Yes — redirect to /open-pr |
| 2. Verify readiness | CI + review state | Yes — fix first |
| 3. Base sync | Rebase if behind | Yes — resolve conflicts |
| 4. Confirm | Wait for user | Yes — wait |
| 5. Squash merge | `gh pr merge --squash` + cleanup | — |

## Rules

**Never:**
- Merge with failing CI
- Merge with CHANGES_REQUESTED
- Force-push to main/master directly
- Skip user confirmation (unless user explicitly opted out for the session)

**Always:**
- Squash merge
- Delete the branch after merge
- Sync locally after merge
- If no PR exists, redirect to `/open-pr`
Pliki w paczce (2)
  • README.md 1 KB
  • SKILL.md 3 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · harnessprotocol/harness-kit100Apache-2.0
sakuro/dotfiles100MIT
globalmindsolution/gms-marketplace100MIT
raddue/crucible100MIT
jikig-ai/soleur95Apache-2.0
hanamizuki/solopreneur95MIT

Migawka bazy z 13.11.2026 · wersja paczki 40c9e960017d (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 4 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 95hk-merge-pr
    Scala pull request przez squash, pisząc wiadomość commita z jego commitów i stopki atrybucji repozytorium.
  • 100pr-merge
    Scala zrecenzowany pull request po poleceniu /pr-merge, gdy PR jest gotowy do merge.
  • 100merge-commit
    Pisze komunikat merge lub squash-merge commita dla bieżącej gałęzi, gotowy do skopiowania do procesu scalania.
  • 100pr-merge-commit
    Przygotowuje komunikat merge lub squash-merge commita dla bieżącej gałęzi, gotowy do skopiowania w procesie scalania.
  • 100merge
    Scala bieżący pull request po osiągnięciu stanu gotowości w pętli babysit, po jednorazowym potwierdzeniu użytkownika i przeglądzie.
  • 100open-pr
    Doprowadza gotową gałąź do scalenia: otwiera pull request do domyślnej gałęzi, a po recenzji koleżanki lub kolegi scala go i sprząta.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.