chore: make merge PR comment mandatory + skill name fix

This commit is contained in:
Gustavo Madeira Santana
2026-02-11 00:45:54 -05:00
parent aade133978
commit 78eca155ac
3 changed files with 16 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
---
name: merge-pr
description: Merge a GitHub PR via squash after /preparepr. Use when asked to merge a ready PR. Do not push to main or modify code. Ensure the PR ends in MERGED state and clean up worktrees after success.
description: Merge a GitHub PR via squash after /prepare-pr. Use when asked to merge a ready PR. Do not push to main or modify code. Ensure the PR ends in MERGED state and clean up worktrees after success.
---
# Merge PR
@@ -63,7 +63,7 @@ Run all commands inside the worktree directory.
Expect these files from earlier steps:
- `.local/review.md` from `/reviewpr`
- `.local/prep.md` from `/preparepr`
- `.local/prep.md` from `/prepare-pr`
```sh
ls -la .local || true
@@ -72,7 +72,7 @@ if [ -f .local/review.md ]; then
echo "Found .local/review.md"
sed -n '1,120p' .local/review.md
else
echo "Missing .local/review.md. Stop and run /reviewpr, then /preparepr."
echo "Missing .local/review.md. Stop and run /reviewpr, then /prepare-pr."
exit 1
fi
@@ -80,7 +80,7 @@ if [ -f .local/prep.md ]; then
echo "Found .local/prep.md"
sed -n '1,120p' .local/prep.md
else
echo "Missing .local/prep.md. Stop and run /preparepr first."
echo "Missing .local/prep.md. Stop and run /prepare-pr first."
exit 1
fi
```
@@ -113,10 +113,10 @@ gh pr checks <PR>
# Check behind main
git fetch origin main
git fetch origin pull/<PR>/head:pr-<PR>
git merge-base --is-ancestor origin/main pr-<PR> || echo "PR branch is behind main, run /preparepr"
git merge-base --is-ancestor origin/main pr-<PR> || echo "PR branch is behind main, run /prepare-pr"
```
If anything is failing or behind, stop and say to run `/preparepr`.
If anything is failing or behind, stop and say to run `/prepare-pr`.
3. Merge PR and delete branch
@@ -135,7 +135,7 @@ fi
```
If merge fails, report the error and stop. Do not retry in a loop.
If the PR needs changes beyond what `/preparepr` already did, stop and say to run `/preparepr` again.
If the PR needs changes beyond what `/prepare-pr` already did, stop and say to run `/prepare-pr` again.
4. Get merge SHA
@@ -144,7 +144,7 @@ merge_sha=$(gh pr view <PR> --json mergeCommit --jq '.mergeCommit.oid')
echo "merge_sha=$merge_sha"
```
5. Optional comment
5. PR comment
Use a literal multiline string or heredoc for newlines.

View File

@@ -1,6 +1,6 @@
---
name: prepare-pr
description: Prepare a GitHub PR for merge by rebasing onto main, fixing review findings, running gates, committing fixes, and pushing to the PR head branch. Use after /reviewpr. Never merge or push to main.
description: Prepare a GitHub PR for merge by rebasing onto main, fixing review findings, running gates, committing fixes, and pushing to the PR head branch. Use after /review-pr. Never merge or push to main.
---
# Prepare PR
@@ -66,9 +66,9 @@ Run all commands inside the worktree directory.
```sh
if [ -f .local/review.md ]; then
echo "Found review findings from /reviewpr"
echo "Found review findings from /review-pr"
else
echo "Missing .local/review.md. Run /reviewpr first and save findings."
echo "Missing .local/review.md. Run /review-pr first and save findings."
exit 1
fi

View File

@@ -7,7 +7,7 @@ description: Review-only GitHub pull request analysis with the gh CLI. Use when
## Overview
Perform a thorough review-only PR assessment and return a structured recommendation on readiness for /preparepr.
Perform a thorough review-only PR assessment and return a structured recommendation on readiness for /prepare-pr.
## Inputs
@@ -69,7 +69,7 @@ else
cd "$WORKTREE_DIR"
fi
# Create local scratch space that persists across /reviewpr to /preparepr to /mergepr
# Create local scratch space that persists across /review-pr to /prepare-pr to /merge-pr
mkdir -p .local
```
@@ -170,11 +170,11 @@ Check if the PR touches code with related documentation such as README, docs, in
Check if `CHANGELOG.md` exists and whether the PR warrants an entry.
- If the project has a changelog and the PR is user-facing, flag missing entry as IMPORTANT.
- Leave the change for /preparepr, only flag it here.
- Leave the change for /prepare-pr, only flag it here.
12. Answer the key question
Decide if /preparepr can fix issues or the contributor must update the PR.
Decide if /prepare-pr can fix issues or the contributor must update the PR.
13. Save findings to the worktree
@@ -192,7 +192,7 @@ Produce a review that matches what you saved to `.local/review.md`.
A) TL;DR recommendation
- One of: READY FOR /preparepr | NEEDS WORK | NEEDS DISCUSSION | NOT USEFUL (CLOSE)
- One of: READY FOR /prepare-pr | NEEDS WORK | NEEDS DISCUSSION | NOT USEFUL (CLOSE)
- 1 to 3 sentences.
B) What changed