Skip to content

Comments

feat: compile openapi-generation release notes into CLI releases#1901

Open
ndimares wants to merge 2 commits intomainfrom
feat/compile-openapi-generation-release-notes
Open

feat: compile openapi-generation release notes into CLI releases#1901
ndimares wants to merge 2 commits intomainfrom
feat/compile-openapi-generation-release-notes

Conversation

@ndimares
Copy link
Contributor

Summary

  • Adds scripts/compile-release-notes.sh that 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 body
  • Adds an update-release-notes job to the release workflow that runs automatically after each release (in parallel with Docker build)
  • Script is idempotent (won't duplicate if re-run) and can also be run manually: bash scripts/compile-release-notes.sh <tag>

Example output

### All Targets
**New Features**
- [`cfe97a1`](url) - add support for renaming object properties referencing a component (#3795)

### TypeScript
**Bug Fixes**
- [`0af2ebb`](url) - update jsonpath and agents to address security vulnerabilities (#3847)

### Terraform
**New Features**
- [`c87eea7`](url) - Support ephemeral resource close operations (#3846)
**Chores**
- [`ceb1fc2`](url) - add ephemeral resource to review provider (#3742)

### Chores
- [`98b6546`](url) - upgrade snapshot tests (#3843)

Test plan

  • Run bash scripts/compile-release-notes.sh v1.723.0 to verify output against the latest release
  • Trigger a test release via workflow_dispatch with is_draft: true to validate the workflow integration

🤖 Generated with Claude Code

ndimares and others added 2 commits February 20, 2026 11:25
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>
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

View 5 additional findings in Devin Review.

Open in Devin Review

')

# Update the GitHub release, replacing the body entirely
echo "$COMPILED_NOTES" | gh release edit "$CURRENT_TAG" --repo "$CLI_REPO" --notes-file -
Copy link
Contributor

Choose a reason for hiding this comment

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

🔴 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.

Suggested change
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 -
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +161 to +162
if (scope == "") {
unscoped = unscoped line "\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

🟡 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.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

1 participant