-
Notifications
You must be signed in to change notification settings - Fork 26
fix: use pithy LLM-generated title for GitHub releases #441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 enhances GitHub release titles by having the LLM generate a pithy, descriptive title in addition to the release notes. Instead of using just the version tag (e.g., v2.13.2), releases will now have meaningful titles like v2.13.2: PowerShell Casing Fix.
Changes:
- Updated the LLM prompt to request a title as the first line in markdown format
- Modified the shell script to parse the title from the LLM output and output it separately
- Updated the GitHub workflow to combine the version tag with the parsed title
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/gen-release-notes.sh | Added title parsing logic and updated prompt to request a markdown title on the first line |
| .github/workflows/publish-cli.yml | Modified to capture the parsed title and combine it with the version tag for the release title |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if [[ $first_line == "# "* ]]; then | ||
| title="${first_line#\# }" |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pattern \\# will only match # with exactly one space. If the LLM output contains multiple spaces after #, or no space, the title extraction will fail. Use a more flexible pattern like ${first_line#\\#[[:space:]]*} to handle variable whitespace.
| if [[ $first_line == "# "* ]]; then | |
| title="${first_line#\# }" | |
| if [[ $first_line == \#* ]]; then | |
| title="${first_line#\#[[:space:]]*}" |
| first_line=$(echo "$output" | head -n1) | ||
| if [[ $first_line == "# "* ]]; then | ||
| title="${first_line#\# }" | ||
| body=$(echo "$output" | tail -n +2) |
Copilot
AI
Jan 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using tail -n +2 will skip the second line (first line after title) if it's blank, which is likely given the format. This could result in losing the blank line separator. Consider preserving it, or if intentional, add a comment explaining the blank line is intentionally removed.
| body=$(echo "$output" | tail -n +2) | |
| # Drop only the first line (title) while preserving any blank separator line | |
| body=$(printf '%s\n' "$output" | sed '1d') |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #441 +/- ##
==========================================
+ Coverage 46.63% 47.36% +0.72%
==========================================
Files 46 47 +1
Lines 6546 6653 +107
Branches 6546 6653 +107
==========================================
+ Hits 3053 3151 +98
- Misses 1732 1739 +7
- Partials 1761 1763 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
- Prompt Claude to start with `# Title` line - Parse title and use for release title: "v1.2.3: Pithy Description" - Body becomes the release notes without duplicate heading
2b4e2c0 to
777f843
Compare
Summary
# Titleon the first linev1.2.3: Pithy DescriptionExample release title:
v2.13.2: PowerShell Casing FixTest plan
# Titlefrom first line🤖 Generated with Claude Code
Note
Improves GitHub release creation to use an LLM-generated pithy title and clean body, with safe fallbacks.
scripts/gen-release-notes.shto produce a first-line title and body; setsRELEASE_TITLEto<tag>: <pithy title>when available, else falls back to the tag--title "$RELEASE_TITLE"togh release create; release notes body is everything after the first line from the scriptgen-release-notes.shprompt updated to require markdown starting with a#title, then parses the first line as the title and the rest as the body; falls back to the version if parsing failsWritten by Cursor Bugbot for commit 777f843. This will update automatically on new commits. Configure here.