Conversation
|
|
|
Reviewed PR #3710. Found critical issues: all three CLI entry points ( Task list (5/5 completed)
|
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3710 +/- ##
=======================================
Coverage 40.04% 40.04%
=======================================
Files 520 520
Lines 19243 19243
Branches 5720 5726 +6
=======================================
Hits 7705 7705
Misses 9342 9342
Partials 2196 2196
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
TL;DR — Replaces the default Changesets changelog with a custom pipeline that assembles a unified root Key changes
Summary | 18 files | 1 commit | base: Changelog assembly pipeline
The pipeline has three stages: read (
Simplified changeset entry format
The
GitHub Release generation in CI
Contributor documentation for writing changelogs
|
There was a problem hiding this comment.
Caution
All three CLI entry points (assemble/index.ts, release/notes.ts, release/tag.ts) only export functions but never invoke them at the module level. The release workflow will silently produce no output — CHANGELOG.md won't be written, the tag will be empty, and the release notes file will be blank.
Additionally, scripts/changelog/index.ts (the TypeScript changesets integration) is never wired into .changeset/config.json — it's orphaned. The active changeset config still points to .changeset/changelog.js. These are two parallel implementations with divergent behavior (e.g. dependency release lines are suppressed in the TS version but included in the JS version).
release/contributors.ts uses gh pr view which requires gh CLI authentication — this may not be available in the release workflow's environment.
| export async function writeRootChangelog(): Promise<void> { | ||
| const content = await assembleRootChangelog(); | ||
| writeFileSync('CHANGELOG.md', content, 'utf-8'); | ||
| } |
There was a problem hiding this comment.
This file only exports functions — it never calls them. When tsx runs it, nothing happens. The pnpm changelog:assemble script will exit silently without writing CHANGELOG.md.
Add a top-level invocation:
writeRootChangelog();| const release = formatReleaseNotes(latest, contributors); | ||
|
|
||
| return release.body; | ||
| } |
There was a problem hiding this comment.
Same issue — generateReleaseNotes() is never called, and even if it were, the result is never written to stdout. The workflow step pnpm changelog:release:notes > release-notes.md will produce an empty file.
Add:
generateReleaseNotes().then((notes) => process.stdout.write(notes));| const nextSequence = todayTags.length + 1; | ||
|
|
||
| return `${today}.${nextSequence}`; | ||
| } |
There was a problem hiding this comment.
Same issue — generateReleaseTag() is never called and never prints to stdout. The workflow step echo "tag=$(pnpm changelog:release:tag)" >> $GITHUB_OUTPUT will capture an empty string.
Add:
generateReleaseTag().then((tag) => process.stdout.write(tag));| .map((tag) => parseInt(tag.split('.')[1], 10)) | ||
| .filter((n) => !Number.isNaN(n)); | ||
|
|
||
| const nextSequence = todayTags.length + 1; |
There was a problem hiding this comment.
todayTags.length + 1 assumes contiguous sequence numbers. If a tag is deleted or there's a gap (e.g. 2026-04-06.1 and 2026-04-06.3 exist but .2 was deleted), this would produce a collision. Use Math.max(0, ...todayTags) + 1 instead.
| for (const pr of prNumbers) { | ||
| try { | ||
| // Use gh to get PR info (faster than hitting API directly) | ||
| const output = execSync(`gh pr view ${pr} --json author --jq '.author.login'`, { |
There was a problem hiding this comment.
gh pr view requires the gh CLI to be authenticated. In the release workflow, the GITHUB_TOKEN env var is set for the changesets action step, but not necessarily for subsequent steps. Verify that gh is authenticated in the "Generate Release Notes" step, or switch to the GitHub REST API via fetch.
| }, | ||
| }; | ||
|
|
||
| export default changelogFunctions; |
There was a problem hiding this comment.
This file is not referenced from .changeset/config.json (which still points to ./changelog.js). It appears to be an orphaned implementation. Either wire it in as the changelog config or remove it.
| internal: 'Core', | ||
| output: 'Core', | ||
| parser: 'Core', | ||
| }; |
There was a problem hiding this comment.
sectionMap is missing the planner, project, and symbols scopes that are hardcoded in assemble/grouper.ts:126-138. The two code paths will classify these scopes differently (Other vs Core). Add them here and have grouper.ts import from this config to keep a single source of truth.
| const breakingEntries = entriesByCategory.get('Breaking') ?? []; | ||
|
|
||
| if (breakingEntries.length > 0) { | ||
| lines.push('### ⚠️ Breaking'); |
There was a problem hiding this comment.
When useSections is true, breaking entries are rendered under ### ⚠️ Breaking (h3) at line 91, and then the sectionOrder loop at line 98 also iterates over 'Breaking' as a section. If an entry has section: 'Breaking' and category: 'Breaking', it could appear twice — once in the top-level breaking block and again when the 'Breaking' section is processed in the loop.
|
|
||
| - name: Generate Release Tag | ||
| id: tag | ||
| run: echo "tag=$(pnpm changelog:release:tag)" >> $GITHUB_OUTPUT |
There was a problem hiding this comment.
The tag step runs after the changesets publish step. At that point, changesets has already created and pushed package-scoped tags (e.g. @hey-api/openapi-ts@0.95.0). But generateReleaseTag() generates a date-based tag (e.g. 2026-04-06.1) that is never created via git tag or pushed — the workflow only uses it as a label for the GitHub Release. The softprops/action-gh-release action will attempt to create a release for a tag that doesn't exist on the remote, which may fail or auto-create a tag at HEAD (not necessarily the release commit).
| // Detect breaking changes (explicit BREAKING or major version) - for future use | ||
| const explicitBreaking = | ||
| /^BREAKING[:\s]/i.test(replacedChangelog) || /\bBREAKING CHANGE\b/i.test(replacedChangelog); | ||
| void explicitBreaking; |
There was a problem hiding this comment.
The explicitBreaking variable is computed and then immediately voided. If this is intentional placeholder code for future use, it should be removed to avoid dead code. If it's meant to be used, it never feeds into the formatted output.
@hey-api/codegen-core
@hey-api/json-schema-ref-parser
@hey-api/nuxt
@hey-api/openapi-ts
@hey-api/shared
@hey-api/spec-types
@hey-api/types
@hey-api/vite-plugin
commit: |

No description provided.