Skip to content

fix: changeset release now catches server-changes#4209

Closed
carderne wants to merge 1 commit into
mainfrom
fix/changeset-release-server-changes
Closed

fix: changeset release now catches server-changes#4209
carderne wants to merge 1 commit into
mainfrom
fix/changeset-release-server-changes

Conversation

@carderne

@carderne carderne commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Changeset releases were missing server-changes from the generated release notes due to ordering issues.

What changed:

  • It still reads live .server-changes/*.md when present.
  • If none are present, it now recovers consumed server-change files from the release branch diff:
    • base: origin/main
    • release branch: origin/changeset-release/main
  • This handles the current workflow order where changeset:version deletes .server-changes before the PR body
    enhancement runs.

@changeset-bot

changeset-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1f48d45

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

@coderabbitai

coderabbitai Bot commented Jul 9, 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8061451a-7508-4798-a99b-70fbdd457360

📥 Commits

Reviewing files that changed from the base of the PR and between e57fd9c and 1f48d45.

📒 Files selected for processing (1)
  • scripts/enhance-release-pr.mjs
📜 Recent review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: code-quality / code-quality
  • GitHub Check: Analyze (actions)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
scripts/enhance-release-pr.mjs (2)

185-187: LGTM!

Also applies to: 215-248


250-287: 🎯 Functional Correctness

No issue: deleted server-change files still resolve to their add commit

			> Likely an incorrect or invalid review comment.

Walkthrough

This change refactors scripts/enhance-release-pr.mjs to centralize retrieval of server change markdown data. parseServerChanges() now calls a new getServerChangeFileData() helper instead of directly reading the .server-changes directory. This helper first attempts to load live .server-changes/*.md files via getLiveServerChangeFileData(); if none are found, it falls back to getDeletedServerChangeFileDataFromReleaseBranch(), which computes a git merge-base between configurable base and release refs, identifies deleted .server-changes files in that range, and recovers their contents using git show, skipping individual files that fail to recover.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the core change but omits required template sections like Closes #, checklist, Testing, Changelog, and Screenshots. Add the required template sections, including an issue reference, checklist items, testing steps, a changelog note, and screenshots or a note that none are needed.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and clearly describes the main fix to changeset release server-changes handling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/changeset-release-server-changes

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.

claude Bot pushed a commit that referenced this pull request Jul 9, 2026
Read .server-changes from git when the working tree copy has already been cleaned up, and log recovery failures instead of swallowing them. Folds in the fix from #4209.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014CjQVhMqLbRo3VuLaGSLfg
@carderne

carderne commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

closed in favour of #4204

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