Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .claude/skills/create-java-pr/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ Skip this step for standalone PRs.

After creating the PR, update the PR description on **every other PR in the stack โ€” including the collection branch PR** โ€” so all PRs have the same up-to-date stack list. Follow the format and commands in `.cursor/rules/pr.mdc` ยง "Stack List in PR Description".

**Important:** When updating PR bodies, never use shell redirects (`>`, `>>`) or pipes (`|`) or compound commands (`&&`). These create compound shell expressions that won't match permission patterns. Instead:
- Use `gh pr view <NUMBER> --json body --jq '.body'` to get the body (output returned directly)
- Use the `Write` tool to save it to a temp file
- Use the `Edit` tool to modify the temp file
- Use `gh pr edit <NUMBER> --body-file /tmp/pr-body.md` to update

## Step 6: Update Changelog

First, determine whether a changelog entry is needed. **Skip this step** (and go straight to "No changelog needed" below) if the changes are not user-facing, for example:
Expand Down Expand Up @@ -173,8 +179,6 @@ git push

If no changelog entry is needed, add `#skip-changelog` to the PR description to disable the changelog CI check:

```bash
gh pr view <PR_NUMBER> --json body --jq '.body' > /tmp/pr-body.md
printf '\n#skip-changelog\n' >> /tmp/pr-body.md
gh pr edit <PR_NUMBER> --body-file /tmp/pr-body.md
```
1. Get the current body: `gh pr view <PR_NUMBER> --json body --jq '.body'`
2. Use the `Write` tool to save the output to `/tmp/pr-body.md`, appending `\n#skip-changelog\n` at the end
3. Update: `gh pr edit <PR_NUMBER> --body-file /tmp/pr-body.md`
16 changes: 5 additions & 11 deletions .cursor/rules/pr.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -223,19 +223,13 @@ No status column โ€” GitHub already shows that. The `---` separates the stack li

This does not apply to standalone PRs or the collection branch PR.

To update the PR description, use `--body-file` to avoid shell quoting issues with special characters in the body:
To update the PR description, use `--body-file` to avoid shell quoting issues with special characters in the body.

```bash
# Get current PR description into a temp file
gh pr view <PR_NUMBER> --json body --jq '.body' > /tmp/pr-body.md

# Edit /tmp/pr-body.md to prepend or replace the stack list section
# (replace everything from "## PR Stack" up to and including the "---" separator,
# or prepend before the existing description if no stack list exists yet)
**Important:** Do not use shell redirects (`>`, `>>`, `|`) or compound commands (`&&`, `||`). These create compound shell expressions that won't match permission patterns. Instead, use the `Write` and `Edit` tools for file manipulation:

# Update the description
gh pr edit <PR_NUMBER> --body-file /tmp/pr-body.md
```
1. Read the current body with `gh pr view <PR_NUMBER> --json body --jq '.body'` (the output is returned directly โ€” use the `Write` tool to save it to `/tmp/pr-body.md`)
2. Use the `Edit` tool to prepend or replace the stack list section in `/tmp/pr-body.md`
3. Update the description: `gh pr edit <PR_NUMBER> --body-file /tmp/pr-body.md`

### Merging Stacked PRs (done by the user, not the agent)

Expand Down
Loading