Skip to content

Commit bac65b8

Browse files
committed
Merge remote-tracking branch 'origin/main' into antonis/feedback-shake
2 parents 6993267 + b1045ed commit bac65b8

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

.claude/skills/create-java-pr/SKILL.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ Derive the branch name from the changes being made. Use `feat/`, `fix/`, `ref/`,
3535

3636
**For stacked PRs:** For the first PR in a new stack, first create and push the collection branch (see `.cursor/rules/pr.mdc` § "Creating the Collection Branch"), then branch the PR off it. For subsequent PRs, branch off the previous stack branch. Use the naming conventions from `.cursor/rules/pr.mdc` § "Branch Naming".
3737

38+
**CRITICAL: Never merge, fast-forward, or push commits into the collection branch.** It stays at its initial position until the user merges stack PRs through GitHub. Updating it will auto-merge and destroy the entire PR stack.
39+
3840
## Step 2: Format Code and Regenerate API Files
3941

4042
```bash
@@ -111,14 +113,15 @@ Fill in each section based on the changes being PR'd. Check any checklist items
111113
- Pass `--base <previous-stack-branch>` so the PR targets the previous branch (first PR in a stack targets the collection branch).
112114
- Use the stacked PR title format: `<type>(<scope>): [<Topic> <N>] <Subject>` (see `.cursor/rules/pr.mdc` § "PR Title Naming").
113115
- Include the stack list at the top of the PR body, before the `## :scroll: Description` section (see `.cursor/rules/pr.mdc` § "Stack List in PR Description" for the format).
116+
- Add a merge method reminder at the very end of the PR body (see `.cursor/rules/pr.mdc` § "Stack List in PR Description" for the exact text). This only applies to stack PRs, not the collection branch PR.
114117

115118
Then continue to Step 5.5 (stacked PRs only) or Step 6.
116119

117120
## Step 5.5: Update Stack List on All PRs (stacked PRs only)
118121

119122
Skip this step for standalone PRs.
120123

121-
After creating the PR, update the PR description on **every other PR in the stack** 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".
124+
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".
122125

123126
## Step 6: Update Changelog
124127

.cursor/rules/pr.mdc

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ git push -u origin HEAD
185185
gh pr create --base main --draft --title "<type>(<scope>): <Topic>" --body "Collection PR for the <Topic> stack. Squash-merge this once all stack PRs are merged."
186186
```
187187

188+
**CRITICAL: Do NOT manually update the collection branch.** Never merge, fast-forward, or push stack branch commits into the collection branch. The collection branch stays at its initial position (the empty commit on `main`) until the user merges individual stack PRs into it one by one through GitHub. If you fast-forward the collection branch to include stack commits, GitHub will auto-merge and delete all stack PR branches, destroying the entire stack.
189+
188190
### Creating a New Stacked PR
189191

190192
1. Start from the tip of the previous stack branch (or the collection branch for the first PR).
@@ -197,7 +199,7 @@ gh pr create --base main --draft --title "<type>(<scope>): <Topic>" --body "Coll
197199

198200
### Stack List in PR Description
199201

200-
Every PR in the stack must have a stack list **at the top of its description** (before the `## :scroll: Description` section). When a new PR is added, update the description on **all** PRs in the stack.
202+
Every PR in the stack — **including the collection branch PR** — must have a stack list **at the top of its description** (before the `## :scroll: Description` section). When a new PR is added, update the description on **all** PRs in the stack and on the collection branch PR.
201203

202204
Format:
203205

@@ -213,6 +215,14 @@ Format:
213215

214216
No status column — GitHub already shows that. The `---` separates the stack list from the rest of the PR description.
215217

218+
**Merge method reminder:** On stack PRs (not the collection branch PR), add the following line at the very end of the PR description:
219+
220+
```markdown
221+
> ⚠️ **Merge this PR using a merge commit** (not squash). Only the collection branch is squash-merged into main.
222+
```
223+
224+
This does not apply to standalone PRs or the collection branch PR.
225+
216226
To update the PR description, use `--body-file` to avoid shell quoting issues with special characters in the body:
217227

218228
```bash
@@ -237,12 +247,12 @@ Once all stack PRs are merged into the collection branch, the collection PR is *
237247

238248
### Syncing the Stack
239249

240-
When a base PR changes (e.g. after addressing review feedback on PR 1), merge the changes forward through the stack:
250+
When a base PR changes (e.g. after addressing review feedback on PR 1), merge the changes forward through the stack **between adjacent stack PR branches only**:
241251

242252
```bash
243253
# On the branch for PR 2
244254
git checkout feat/scope-attributes-logger
245-
git merge feat/scope-attributes
255+
git merge feat/scope-attributes-api
246256
git push
247257

248258
# On the branch for PR 3
@@ -251,4 +261,6 @@ git merge feat/scope-attributes-logger
251261
git push
252262
```
253263

264+
**Never merge into the collection branch.** Syncing only happens between stack PR branches. The collection branch is untouched until the user merges PRs through GitHub.
265+
254266
Prefer merge over rebase — it preserves commit history, doesn't invalidate existing review comments, and avoids the need for force-pushing. Only rebase if explicitly requested.

0 commit comments

Comments
 (0)