feat: compile openapi-generation release notes into CLI releases#1901
feat: compile openapi-generation release notes into CLI releases#1901
Conversation
Add a script and workflow job that automatically pulls release notes from all openapi-generation releases included in a CLI release and appends them to the GitHub release body, grouped by target language then change type. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Drop the original changelog and header — the release body is now just the grouped openapi-generation changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| ') | ||
|
|
||
| # Update the GitHub release, replacing the body entirely | ||
| echo "$COMPILED_NOTES" | gh release edit "$CURRENT_TAG" --repo "$CLI_REPO" --notes-file - |
There was a problem hiding this comment.
🔴 Release body is replaced instead of appended, discarding original CLI changelog
The script overwrites the entire GitHub release body with only the compiled openapi-generation notes, discarding the original CLI changelog generated by goreleaser/conventional-changelog.
Root Cause
At scripts/compile-release-notes.sh:60, the original release body is fetched into CURRENT_BODY, but it is only used for the idempotency check on line 61. On line 227, the release is updated with only COMPILED_NOTES:
echo "$COMPILED_NOTES" | gh release edit "$CURRENT_TAG" --repo "$CLI_REPO" --notes-file -This replaces the entire release body. The original CLI release notes (commit changelog from goreleaser) are permanently lost. The PR description says the script "appends them to the CLI's GitHub release body", but the actual behavior is a full replacement.
Impact: Every CLI release will lose its original changelog (listing CLI-specific commits, breaking changes, etc.) and only show the openapi-generation dependency changes.
| echo "$COMPILED_NOTES" | gh release edit "$CURRENT_TAG" --repo "$CLI_REPO" --notes-file - | |
| UPDATED_BODY="${CURRENT_BODY} | |
| --- | |
| ${COMPILED_NOTES}" | |
| echo "$UPDATED_BODY" | gh release edit "$CURRENT_TAG" --repo "$CLI_REPO" --notes-file - |
Was this helpful? React with 👍 or 👎 to provide feedback.
| if (scope == "") { | ||
| unscoped = unscoped line "\n" |
There was a problem hiding this comment.
🟡 Unscoped items are always labeled as "Chores" regardless of actual category
Items without a **scope**: prefix (e.g., - [\abc123`](url) - some new feature) are all grouped under ### Chores`, even if they were parsed under a "New Features" or "Bug Fixes" heading.
Root Cause
At scripts/compile-release-notes.sh:160-162, when scope is empty, the item is appended to the unscoped variable without preserving its cat (category). Then at lines 218-219, all unscoped items are unconditionally printed under ### Chores:
if (unscoped != "") {
print "### Chores"
printf "%s", unscoped
print ""
}This means a new feature or bug fix without a language/target scope will be mislabeled as a chore in the compiled release notes.
Impact: Release notes may misclassify unscoped new features and bug fixes as chores, giving users an inaccurate picture of what changed.
Prompt for agents
In scripts/compile-release-notes.sh, the awk script at lines 160-162 puts all unscoped items into a single 'unscoped' variable, then at lines 218-221 prints them all under '### Chores'. Instead, unscoped items should be tracked per category. Replace the single 'unscoped' variable with a per-category approach, e.g. 'unscoped_items[cat] = unscoped_items[cat] line "\n"' at line 162, and then in the END block (lines 218-222) iterate over the categories and print each non-empty unscoped category with its proper heading (New Features, Bug Fixes, Chores) under a general '### Other' or similar section header.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
scripts/compile-release-notes.shthat fetches all openapi-generation releases between the previous and current CLI release, groups changes by target language (All Targets, TypeScript, Python, Go, Terraform, Java, Ruby, C#, PHP) then by change type (New Features, Bug Fixes, Chores), and appends them to the CLI's GitHub release bodyupdate-release-notesjob to the release workflow that runs automatically after each release (in parallel with Docker build)bash scripts/compile-release-notes.sh <tag>Example output
Test plan
bash scripts/compile-release-notes.sh v1.723.0to verify output against the latest releaseworkflow_dispatchwithis_draft: trueto validate the workflow integration🤖 Generated with Claude Code