Skip to content

Commit 2dd9c75

Browse files
nbudinclaude
andcommitted
Confirm with user before publishing major or minor version bumps in release-pr skill
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 24d95bf commit 2dd9c75

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

.claude/commands/release-pr.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,23 @@ gh run watch <run-id> --interval 30
4242

4343
The `update-release-draft` job at the end of CI creates or updates the draft release. If any job on `main` fails, stop and report to the user.
4444

45-
## Step 4: Find the draft release
45+
## Step 4: Find the draft release and check the version bump
4646

47-
List recent releases to find the draft that was just updated:
47+
List recent releases to find the draft and the last published release:
4848

4949
```bash
5050
gh release list --limit 5 --json tagName,name,isDraft
5151
```
5252

53-
Identify the draft release (isDraft: true). Confirm its name with the user before publishing.
53+
Identify the draft release (isDraft: true) and the most recent non-draft release. Parse their
54+
semantic version numbers (e.g. `v1.2.3`) and determine whether the bump from the previous release
55+
to the draft is a **patch** (only the third number changed), **minor** (second number changed), or
56+
**major** (first number changed).
57+
58+
- If the bump is **minor or major**, stop and explicitly ask the user: "The draft release is
59+
`<draft-name>`, which is a [minor/major] bump from `<previous-name>`. Is that correct?" Do not
60+
proceed until the user confirms.
61+
- If the bump is **patch**, proceed without asking.
5462

5563
## Step 5: Publish the draft release
5664

0 commit comments

Comments
 (0)