Skip to content

Commit f68f205

Browse files
adinauerclaude
andcommitted
fix(create-java-pr): Detect collection branches with downstream PRs
Check for downstream PRs even when the current branch already has a PR targeting main/master. This prevents collection branches in a stacked PR flow from being misclassified as standalone PR context. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent fdcc396 commit f68f205

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ git branch --show-current
3030
gh pr list --head "$(git branch --show-current)" --json number,baseRefName,title --jq '.[0]'
3131
```
3232
- If that branch PR exists and `baseRefName` is **not** `main`/`master`, treat the work as a **stacked PR context**.
33-
- If that branch PR exists and `baseRefName` **is** `main`/`master`, treat it as **standalone PR context**.
33+
- If that branch PR exists and `baseRefName` **is** `main`/`master`, also check whether other PRs target the current branch:
34+
```bash
35+
gh pr list --base "$(git branch --show-current)" --json number,headRefName,title
36+
```
37+
- If there are downstream PRs, treat this as a **stack base context** (collection branch).
38+
- If there are no downstream PRs, treat it as **standalone PR context**.
3439
- If no PR exists for the current branch, check whether other PRs target it:
3540
```bash
3641
gh pr list --base "$(git branch --show-current)" --json number,headRefName,title

0 commit comments

Comments
 (0)