35 lines
1.8 KiB
Markdown
35 lines
1.8 KiB
Markdown
# Template: merge a PR (eligible reviewer only)
|
|
|
|
Copy, fill the `<...>` fields, and paste as the task prompt.
|
|
|
|
```text
|
|
Task: merge PR #<pr> for issue #<n> if it is eligible and checks pass.
|
|
|
|
Rules (llm-project-workflow):
|
|
- Only an eligible, NON-author reviewer merges. If authenticated user == PR
|
|
author → STOP.
|
|
- Do not merge unless the PR is open, mergeable, and its checks/review pass.
|
|
- No force-merge, no bypassing branch protections.
|
|
- If the PR is closed but `merged=false`, STOP and run reconciliation. Do not clean up.
|
|
|
|
Steps:
|
|
1. Identity Checklist: Before claiming/working on merge, verify and state:
|
|
- Required identity/profile for this task: merger (allowed to merge PRs)
|
|
- Current authenticated identity (from whoami): <username>
|
|
- Target task role: merger identity (must NOT be the PR author)
|
|
*If the current identity does not match the required role (or is the PR author), STOP. Relaunch/switch to the correct profile first.*
|
|
2. Verify authenticated identity + active profile.
|
|
3. Confirm PR #<pr>: author (not you), state open, mergeable, review approved. Check if PR body uses `Closes #N` or `Fixes #N`; if it uses `Implements #N` or `Refs #N`, manual closing will be needed in step 29.
|
|
4. If any gate fails → STOP and report.
|
|
4. Merge with explicit confirmation (e.g. confirmation="MERGE PR <pr>"),
|
|
optionally pinning the reviewed head SHA / changed-file set.
|
|
5. Confirm remote master now contains the merge commit.
|
|
|
|
Then run the cleanup template (worktree-cleanup.md):
|
|
- close/release issue #<n>, remove status:in-progress (if it cannot be removed, report why)
|
|
- delete remote branch, remove local branch + worktree folder
|
|
- fetch/prune; confirm main checkout is clean and current (0 0).
|
|
|
|
Handoff: reviewer identity, merge result + commit, cleanup done, issue closed, PR metadata state/merged flag/hash, remote master hash & Git content check.
|
|
```
|