Skip to content

chore(scripts/create-github-release): fix release-notes diff range after 'Version Packages' PR is squash-merged - #11279

Merged
sukvvon merged 1 commit into
mainfrom
ci/fix-release-notes-diff-range-after-version-packages-pr
Aug 25, 2026
Merged

chore(scripts/create-github-release): fix release-notes diff range after 'Version Packages' PR is squash-merged#11279
sukvvon merged 1 commit into
mainfrom
ci/fix-release-notes-diff-range-after-version-packages-pr

Conversation

@sukvvon

@sukvvon sukvvon commented Aug 24, 2026

Copy link
Copy Markdown
Member

🎯 Changes

The GitHub Release published today (release-2026-08-24-1925) listed three unrelated svelte-query fixes from the previous release instead of the two commits actually included (#11274, #11275). npm publishing and package versions were unaffected — only the "## Changes" summary on the GitHub Release was wrong.

Root cause: scripts/create-github-release.mjs finds the previous release commit by grepping the full commit message for the substring ci: changeset release (the commit message changesets/action writes on its changeset-release/main branch). When the "Version Packages" PR carries a single commit, GitHub's squash-merge copies that commit's message into the squash commit body, so the substring survives and the grep works. When the PR is updated multiple times before merge (as happened today, after both #11274 and #11275 landed in quick succession), the PR has multiple commits, and GitHub's squash-merge instead uses the PR title only — so the squash commit body no longer contains ci: changeset release, the grep silently skips the actual release commit, and the script's "previous release" pointer shifts back by one release.

TanStack/router hit and fixed this exact bug in #7456 — this PR ports that fix:

  • git log --grep now anchors both patterns with ^ and additionally matches ^ci: Version Packages (the squash commit's title), so the release commit is found regardless of how GitHub composed the squash message.
  • The changelog-commit skip filter also recognizes ci: Version Packages as a release commit to exclude.

Verified locally by re-running the (patched) diff-range logic against today's actual history — it now resolves previousRelease to 96f2da635 (#11271) instead of 388bbaf18, and correctly yields exactly the #11274/#11275 commits for the changelog.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Bug Fixes
    • Improved release detection to recognize both supported release commit formats.
    • Prevented automated changelogs from including internal release commits.

@sukvvon
sukvvon requested a review from a team as a code owner August 24, 2026 19:41
@nx-cloud

nx-cloud Bot commented Aug 24, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 08ac43e

Command Status Duration Result
nx run-many --target=build --exclude=examples/*... ✅ Succeeded <1s View ↗
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 42s View ↗

☁️ Nx Cloud last updated this comment at 2026-08-24 19:49:25 UTC

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f052b0de-9227-4adb-a686-fbc229ba6dee

📥 Commits

Reviewing files that changed from the base of the PR and between 730b3aa and 08ac43e.

📒 Files selected for processing (1)
  • scripts/create-github-release.mjs

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The release script now recognizes ci: Version Packages and ci: changeset release commits for release-base detection and excludes both commit types from generated changelogs.

Changes

Release commit handling

Layer / File(s) Summary
Release detection and changelog filtering
scripts/create-github-release.mjs
Release-base lookup recognizes both release commit formats. Changelog generation excludes both formats.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 08ac4

This localized CI change corrects GitHub Release changelog ranges after squash-merging Version Packages PRs. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: alemtuzlak

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the release-notes diff-range fix in the release script after a Version Packages squash merge.
Description check ✅ Passed The description explains the issue, root cause, implementation, verification, checklist status, and release impact.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/fix-release-notes-diff-range-after-version-packages-pr

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@pkg-pr-new

pkg-pr-new Bot commented Aug 24, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@11279

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@11279

@tanstack/lit-query

npm i https://pkg.pr.new/@tanstack/lit-query@11279

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@11279

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@11279

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@11279

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@11279

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@11279

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@11279

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@11279

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@11279

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@11279

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@11279

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@11279

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@11279

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@11279

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@11279

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@11279

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@11279

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@11279

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@11279

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@11279

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@11279

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@11279

commit: aaa789d

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.97 KB (0%)
react minimal 8.92 KB (0%)

@sukvvon
sukvvon force-pushed the ci/fix-release-notes-diff-range-after-version-packages-pr branch from 08ac43e to aaa789d Compare August 24, 2026 19:47
@sukvvon sukvvon changed the title ci(scripts/create-github-release): fix release-notes diff range after 'Version Packages' PR is squash-merged chore(scripts/create-github-release): fix release-notes diff range after 'Version Packages' PR is squash-merged Aug 24, 2026
@sukvvon sukvvon self-assigned this Aug 24, 2026
@sukvvon
sukvvon merged commit bceba4a into main Aug 25, 2026
9 checks passed
@sukvvon
sukvvon deleted the ci/fix-release-notes-diff-range-after-version-packages-pr branch August 25, 2026 02:12
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.

2 participants