You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a customized hack for it. There is a PR somewhere here for adding a --dry-run flag which should solve this. Anyway, here's my hack;
Context
monorepo using pnpm
custom helper file at the root project
only creating a pull request. no package is published
single changeset per action
Steps
Create helper file at project root
release-helper.js
constconfig=require('./release.json');const{unlink}=require('fs')constcommit_message=`v${config.releases[0].newVersion} of ${config.releases[0].name}`unlink('./release.json',()=>{})console.log(commit_message)
Incase you are ever interested in the jq version - @r115
It creates a release.json file temporarily extracts the version using jq and then removes the file (this is due to an outstanding feature request changesets/changesets#1020)
Leaving here in case it helps anyone else, @hollandjake's script above is incredible and saved me a ton of time but was also capturing the output of the pnpm changeset status --output=release.json which was something like:
The cleanest way I've found to capture the new release version to use in PR title (unfortunately solutions suggested above tricky to set up properly and they do not always work - maybe due to me being in the prerelease mode):
Activity
denizdogan commentedon Aug 28, 2023
Did you figure this out? I'm looking for the same thing.
lakardion commentedon Sep 16, 2023
I would love to know as well how I can add the version to the PR title
r115 commentedon Nov 8, 2023
I have a customized hack for it. There is a PR somewhere here for adding a --dry-run flag which should solve this. Anyway, here's my hack;
Context
Steps
Create helper file at project root
release-helper.jsAdd a step to generate changeset
profit
This stuff can possibly be knocked out with a one liner using
jq. Just didn't want to jump through the hoops until the solution works over some time.hollandjake commentedon Jan 12, 2024
Incase you are ever interested in the jq version - @r115
It creates a release.json file temporarily extracts the version using jq and then removes the file (this is due to an outstanding feature request changesets/changesets#1020)
dcroote commentedon Feb 21, 2024
@hollandjake this is excellent, thanks
jpconnol commentedon Nov 11, 2024
Leaving here in case it helps anyone else, @hollandjake's script above is incredible and saved me a ton of time but was also capturing the output of the
pnpm changeset status --output=release.jsonwhich was something like:To reconcile, I had to adjust it ever so slightly to ensure that we only captured the new version number itself:
andreww2012 commentedon Nov 30, 2025
The cleanest way I've found to capture the new release version to use in PR title (unfortunately solutions suggested above tricky to set up properly and they do not always work - maybe due to me being in the prerelease mode):