Skip to content

Conversation

@jvdm
Copy link
Contributor

@jvdm jvdm commented Dec 10, 2025

Summary

  • Adds scripts/patch-release.sh to automate the scanner patch release process
  • Auto-detects the next patch number when not provided
  • Validates that HEAD is not already a release commit
  • Verifies sequential patch numbering
  • Handles GitHub release creation with proper --latest flag based on semantic versioning

Usage

./scripts/patch-release.sh <RELEASE> [PATCH_NUMBER]

Options:

  • --dry-run - Preview what would happen without making changes
  • -y, --yes - Skip confirmations (for automation)

Examples:

./scripts/patch-release.sh 2.36           # auto-detects next patch
./scripts/patch-release.sh 2.36 9         # explicitly creates 2.36.9
./scripts/patch-release.sh --dry-run 2.36 # preview mode

Test plan

  • Run ./scripts/patch-release.sh --dry-run 2.37 to verify workflow
  • Verify auto-detection of next patch number
  • Verify detection of existing release commits at HEAD
  • Verify non-sequential patch number warning

@jvdm jvdm requested a review from a team as a code owner December 10, 2025 19:16
@BradLugo
Copy link
Contributor

Why a slash command instead of a script? I ask because I have some trust issues with LLMs based on experience, and feel that having code we can validate is safer and easier to reason with when something goes wrong.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a /patch-release Claude Code slash command that automates the scanner patch release process. The command streamlines creating patch releases by handling version detection, validation, git operations, and GitHub release creation.

Key changes:

  • Auto-detection of the next patch number when not explicitly provided
  • Validation checks for release commit state and sequential patch numbering
  • Automated GitHub release creation with proper semantic versioning handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jvdm
Copy link
Contributor Author

jvdm commented Dec 10, 2025

Why a slash command instead of a script?

This more of an experiment rather than a suggestion on how we should manage scanner releases. These slash commands are just prompt templates, and all "judgement calls" LLM could do are scriptable here.

@BradLugo
Copy link
Contributor

BradLugo commented Dec 11, 2025

Would this be better suited for one of the tooling repos?

@jvdm
Copy link
Contributor Author

jvdm commented Dec 12, 2025

Would this be better suited for one of the tooling repos?

Probably. I think this is an example of AI vibe, so tooling might make more sense. I might look into converting these steps into a script, maybe using claude to do it.

@jvdm
Copy link
Contributor Author

jvdm commented Dec 15, 2025

@BradLugo Asked Claude to convert this to a script. Can you take a look to see if it makes sense?

@jvdm jvdm requested a review from Copilot December 15, 2025 21:37
@jvdm jvdm changed the title Add Claude Code slash command for patch releases Add patch release script Dec 15, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

jvdm and others added 7 commits December 15, 2025 15:39
Adds a `/patch-release` command that automates the scanner patch release
process. The command handles:

- Auto-detection of the next patch number
- Validation that HEAD is not already a release commit
- Sequential patch number verification
- Cherry-pick prompts
- GitHub release creation with proper --latest flag handling
- Release documentation generation

Usage: /patch-release <RELEASE> [PATCH_NUMBER]
Example: /patch-release 2.36 (auto-detects next patch)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The LLM-based slash command has been replaced with a deterministic
bash script that provides the same functionality with:

- Full testability (--dry-run mode)
- Auditability (every command visible in source)
- Reproducibility (same input → same behavior)
- Proper error handling (set -euo pipefail)

Usage: ./scripts/patch-release.sh [--dry-run] [-y] <RELEASE> [PATCH_NUMBER]

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@jvdm jvdm force-pushed the jvdm/claude-based-patch-release branch from 05524ea to 588ee26 Compare December 15, 2025 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants