You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1882d93
Browse filesBrowse the repository at this point in the historyBrowse files
ref(skill): Defer to the shared Sentry skills in create-java-pr (#6621)
* fix(skill): Use pr-writer in the create-java-pr skill
getsentry/skills renamed create-pr to pr-writer and then removed the old name, so Step 5
called a skill that no longer exists. Keep the repo PR template as the body structure
over pr-writer's default shape, as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ref(skill): Defer to the shared Sentry skills in create-java-pr
Branch naming, commit format, and PR title format now come from create-branch, commit, and
pr-writer instead of local copies that had already drifted (the commit types lacked revert).
Add #skip-changelog to the first PR body instead of editing it afterwards, and write PR bodies
to per-branch or per-PR files. The shared /tmp/pr-body.md outlives sessions and once opened a
PR with another PR's body.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ref(skill): Pass the per-branch body file to gh pr create
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* ref(skill): Align the stacked PR reference with Step 5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/skills/create-java-pr/SKILL.md
+20-38Lines changed: 20 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,17 +55,7 @@ If the user explicitly says "stack", "stacked PR", or provides numbered stack ti
55
55
56
56
## Step 1: Ensure Feature Branch
57
57
58
-
```bash
59
-
git branch --show-current
60
-
```
61
-
62
-
If on `main` or `master`, create and switch to a new branch:
63
-
64
-
```bash
65
-
git checkout -b <type>/<short-description>
66
-
```
67
-
68
-
Derive the branch name from the changes being made. Use `feat/`, `fix/`, `ref/`, etc. matching the commit type conventions.
58
+
If on `main` or `master`, invoke the `sentry-skills:create-branch` skill.
69
59
70
60
**For stacked PRs:** For the first PR in a new stack, first create and push the collection branch (see `references/stacked-prs.md` § "Why a Collection Branch"), then branch the PR off it. For subsequent PRs, branch off the previous stack branch. Give every branch in the stack a shared prefix naming the feature, with a descriptive suffix per PR.
71
61
@@ -89,13 +79,7 @@ Check for uncommitted changes:
89
79
git status --porcelain
90
80
```
91
81
92
-
If there are uncommitted changes, invoke the `sentry-skills:commit` skill to stage and commit them following [Sentry commit message conventions](https://develop.sentry.dev/engineering-practices/commit-messages/):
- `fix(android): Prevent crash on API 21 when registering receiver`
123
+
If the change needs no changelog entry (see Step 6), make `#skip-changelog` the last line of the
124
+
body to disable the changelog CI check.
139
125
140
126
**For stacked PRs:**
141
127
142
128
- Pass `--base <previous-stack-branch>` so the PR targets the previous branch (first PR in a stack targets the collection branch).
143
129
- Use the stacked PR title format: `<type>(<scope>): [<Topic><N>] <Subject>` (see `references/stacked-prs.md` § "PR Title Naming").
144
130
- Include the stack list at the top of the PR body, before the `## :scroll: Description` section (see `references/stacked-prs.md` § "Stack List in PR Description"for the format).
145
-
- Add a merge method reminder at the very end of the PR body (see `references/stacked-prs.md` § "Stack List in PR Description"for the exact text). This only applies to stack PRs, not the collection branch PR.
131
+
- Add a merge method reminder at the end of the PR body, above any `#skip-changelog` (see `references/stacked-prs.md` § "Stack List in PR Description"for the exact text). This only applies to stack PRs, not the collection branch PR.
146
132
147
133
Then continue to Step 5.5 (stacked PRs only) or Step 6.
148
134
@@ -156,7 +142,8 @@ Edit each body using the procedure in § "Editing PR Descriptions" below.
156
142
157
143
## Step 6: Update Changelog
158
144
159
-
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:
145
+
Decide whether a changelog entry is needed before Step 5, which adds `#skip-changelog` to the PR
146
+
body when it is not. **Skip this step**if the changes are not user-facing, for example:
160
147
161
148
- Test-only changes (new tests, test refactors, test fixtures)
162
149
- CI/CD or build configuration changes
@@ -190,7 +177,7 @@ Create the subsection under `## Unreleased` if it does not already exist.
190
177
- <Short description of the change> ([#<PR_NUMBER>](https://github.com/getsentry/sentry-java/pull/<PR_NUMBER>))
191
178
```
192
179
193
-
Use the PR number returned by `sentry-skills:create-pr`. Match the style of existing entries — sentence case, ending with the PR link, no trailing period.
180
+
Use the number of the PR created in Step 5. Match the style of existing entries — sentence case, ending with the PR link, no trailing period.
194
181
195
182
#### Commit and push
196
183
@@ -202,16 +189,11 @@ git commit -m "changelog"
202
189
git push
203
190
```
204
191
205
-
### No changelog needed
206
-
207
-
If no changelog entry is needed, append `#skip-changelog` to the end of the PR description to disable
208
-
the changelog CI check, using the procedure in § "Editing PR Descriptions" below.
209
-
210
192
## Editing PR Descriptions
211
193
212
194
Do not use shell redirects (`>`, `>>`), pipes (`|`), or compound commands (`&&`, `||`). These create
213
195
compound shell expressions that won't match permission patterns. Instead:
214
196
215
197
1. Read the body with `gh pr view <PR_NUMBER> --json body --jq '.body'` (output is returned directly)
216
-
2. Use the `Write` tool to save it to `/tmp/pr-body.md`, and the `Edit` tool to modify it
217
-
3. Update with `gh pr edit <PR_NUMBER> --body-file /tmp/pr-body.md`
198
+
2. Use the `Write` tool to save it to `/tmp/pr-body-<PR_NUMBER>.md`, and the `Edit` tool to modify it
199
+
3. Once the write succeeds, update with `gh pr edit <PR_NUMBER> --body-file /tmp/pr-body-<PR_NUMBER>.md`
0 commit comments