mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
chore: make merge PR comment mandatory + skill name fix
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: merge-pr
|
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
|
# Merge PR
|
||||||
@@ -63,7 +63,7 @@ Run all commands inside the worktree directory.
|
|||||||
Expect these files from earlier steps:
|
Expect these files from earlier steps:
|
||||||
|
|
||||||
- `.local/review.md` from `/reviewpr`
|
- `.local/review.md` from `/reviewpr`
|
||||||
- `.local/prep.md` from `/preparepr`
|
- `.local/prep.md` from `/prepare-pr`
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
ls -la .local || true
|
ls -la .local || true
|
||||||
@@ -72,7 +72,7 @@ if [ -f .local/review.md ]; then
|
|||||||
echo "Found .local/review.md"
|
echo "Found .local/review.md"
|
||||||
sed -n '1,120p' .local/review.md
|
sed -n '1,120p' .local/review.md
|
||||||
else
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ if [ -f .local/prep.md ]; then
|
|||||||
echo "Found .local/prep.md"
|
echo "Found .local/prep.md"
|
||||||
sed -n '1,120p' .local/prep.md
|
sed -n '1,120p' .local/prep.md
|
||||||
else
|
else
|
||||||
echo "Missing .local/prep.md. Stop and run /preparepr first."
|
echo "Missing .local/prep.md. Stop and run /prepare-pr first."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
```
|
```
|
||||||
@@ -113,10 +113,10 @@ gh pr checks <PR>
|
|||||||
# Check behind main
|
# Check behind main
|
||||||
git fetch origin main
|
git fetch origin main
|
||||||
git fetch origin pull/<PR>/head:pr-<PR>
|
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
|
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 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
|
4. Get merge SHA
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ merge_sha=$(gh pr view <PR> --json mergeCommit --jq '.mergeCommit.oid')
|
|||||||
echo "merge_sha=$merge_sha"
|
echo "merge_sha=$merge_sha"
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Optional comment
|
5. PR comment
|
||||||
|
|
||||||
Use a literal multiline string or heredoc for newlines.
|
Use a literal multiline string or heredoc for newlines.
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: prepare-pr
|
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
|
# Prepare PR
|
||||||
@@ -66,9 +66,9 @@ Run all commands inside the worktree directory.
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
if [ -f .local/review.md ]; then
|
if [ -f .local/review.md ]; then
|
||||||
echo "Found review findings from /reviewpr"
|
echo "Found review findings from /review-pr"
|
||||||
else
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ description: Review-only GitHub pull request analysis with the gh CLI. Use when
|
|||||||
|
|
||||||
## Overview
|
## 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
|
## Inputs
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ else
|
|||||||
cd "$WORKTREE_DIR"
|
cd "$WORKTREE_DIR"
|
||||||
fi
|
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
|
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.
|
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.
|
- 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
|
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
|
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
|
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.
|
- 1 to 3 sentences.
|
||||||
|
|
||||||
B) What changed
|
B) What changed
|
||||||
|
|||||||
Reference in New Issue
Block a user