Skip to content

docs: new changelog#3710

Draft
mrlubos wants to merge 2 commits intomainfrom
docs/changelog
Draft

docs: new changelog#3710
mrlubos wants to merge 2 commits intomainfrom
docs/changelog

Conversation

@mrlubos
Copy link
Copy Markdown
Member

@mrlubos mrlubos commented Apr 6, 2026

No description provided.

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@pullfrog
Copy link
Copy Markdown

pullfrog bot commented Apr 6, 2026

Reviewed PR #3710. Found critical issues: all three CLI entry points (assemble/index.ts, release/notes.ts, release/tag.ts) are inert — they export async functions but never invoke them, so the release workflow will silently produce no output. Also flagged: orphaned scripts/changelog/index.ts not wired into changeset config, gh CLI auth dependency in contributor extraction, PR number extraction scoped too broadly (all versions instead of latest release), potential duplicate breaking entries, and scope mapping inconsistencies between config.ts and grouper.ts. Review →

Task list (5/5 completed)
  • Read PR diff and identify major areas of change
  • Review changelog generation scripts (core logic)
  • Review configuration and infrastructure changes
  • Review release workflow and docs changes
  • Submit review

Pullfrog  | View workflow run | Triggered by Pullfrog𝕏

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 6, 2026

⚠️ No Changeset found

Latest commit: 5d63888

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hey-api-docs Ready Ready Preview, Comment Apr 10, 2026 1:13am

Request Review

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.04%. Comparing base (d54995e) to head (5d63888).

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           
Flag Coverage Δ
unittests 40.04% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pullfrog
Copy link
Copy Markdown

pullfrog bot commented Apr 6, 2026

TL;DR — Replaces the default Changesets changelog with a custom pipeline that assembles a unified root CHANGELOG.md grouped by release date, categorizes entries by scope and type, and generates GitHub Releases with contributor attribution — all integrated into the release CI workflow.

Key changes

  • Custom changelog assembly pipeline in scripts/changelog/ — Adds ~1,000 lines across 12 new files to read per-package changelogs, parse/categorize entries (Breaking/Added/Fixed/Changed by Core/Plugins/Other), and write a grouped root CHANGELOG.md.
  • Simplified changeset entry formatting in changelog.js — Detects **scope**: description format, strips commit hashes and author metadata, and appends only the PR link.
  • GitHub Release creation in the release workflow — Disables Changesets' built-in releases, generates date-based tags (YYYY-MM-DD.N), extracts contributor lists from PRs, and creates releases via softprops/action-gh-release@v2.
  • Contributor docs for writing changelogs — Documents scope conventions and changeset format in the developing guide.

Summary | 18 files | 1 commit | base: maindocs/changelog


Changelog assembly pipeline

Before: Each package had its own CHANGELOG.md managed by Changesets; no unified root changelog existed.
After: A pnpm changelog:assemble step reads all package changelogs, groups releases by git tag date, and writes a structured root CHANGELOG.md with hierarchical sections.

The pipeline has three stages: read (reader.ts parses version blocks from each package changelog), group (grouper.ts correlates versions with git tag dates and parses entries into scope/category/section), and assemble (index.ts formats and writes the final markdown). For @hey-api/openapi-ts, entries get hierarchical sections (Breaking > Core > Plugins > Other); other packages use flat category grouping.

How are entries categorized?

config.ts defines scope-to-section mappings (e.g. client → Core, zod → Plugins), section display order, and breaking-change detection patterns. breaking.ts detects breaking changes via explicit BREAKING markers, major bumps, and for v0.x packages, minor bumps with signal words like "removed" or "renamed". parse.ts extracts frontmatter, scope, PR numbers, and breaking status from raw .changeset/*.md files.

scripts/changelog/assemble/index.ts · scripts/changelog/assemble/grouper.ts · scripts/changelog/config.ts · scripts/changelog/breaking.ts


Simplified changeset entry format

Before: Each changelog entry included commit hashes, author links, and multi-line summary handling.
After: Entries use **scope**: description ([#PR](url)) format — scope is auto-detected, and only the PR link is appended.

The changelog.js module now parses scope from **scope**: patterns, builds entry parts as an array, and joins them into a single clean line. Author/contributor attribution moves to the release notes level instead.

.changeset/changelog.js · .changeset/config.json


GitHub Release generation in CI

Before: Changesets created GitHub Releases automatically with its default format.
After: Three new workflow steps generate a date-based release tag, write release notes with contributor acknowledgment, and create a GitHub Release via softprops/action-gh-release@v2.

tag.ts generates YYYY-MM-DD.N tags (incrementing for same-day releases). contributors.ts extracts usernames from PR numbers via gh pr view, filtering bots. format.ts assembles the release body with per-package version headers and a contributor section.

.github/workflows/release.yml · scripts/changelog/release/tag.ts · scripts/changelog/release/notes.ts · scripts/changelog/release/contributors.ts


Contributor documentation for writing changelogs

Before: No documentation on changelog entry conventions.
After: A "Writing Changelogs" section in the developing guide documents scope conventions and changeset format requirements.

docs/openapi-ts/community/contributing/developing.md

Pullfrog  | View workflow run | Triggered by Pullfrog𝕏

Copy link
Copy Markdown

@pullfrog pullfrog bot left a comment

Choose a reason for hiding this comment

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

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.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run𝕏

export async function writeRootChangelog(): Promise<void> {
const content = await assembleRootChangelog();
writeFileSync('CHANGELOG.md', content, 'utf-8');
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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}`;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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'`, {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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',
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 7, 2026

Open in StackBlitz

@hey-api/codegen-core

npm i https://pkg.pr.new/@hey-api/codegen-core@3710

@hey-api/json-schema-ref-parser

npm i https://pkg.pr.new/@hey-api/json-schema-ref-parser@3710

@hey-api/nuxt

npm i https://pkg.pr.new/@hey-api/nuxt@3710

@hey-api/openapi-ts

npm i https://pkg.pr.new/@hey-api/openapi-ts@3710

@hey-api/shared

npm i https://pkg.pr.new/@hey-api/shared@3710

@hey-api/spec-types

npm i https://pkg.pr.new/@hey-api/spec-types@3710

@hey-api/types

npm i https://pkg.pr.new/@hey-api/types@3710

@hey-api/vite-plugin

npm i https://pkg.pr.new/@hey-api/vite-plugin@3710

commit: 589ee44

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