Description
After upgrading @changesets/cli to v3, changesets-gitlab no longer performs the release after the version MR has been merged.
Instead, it runs the version command again, creates or resets the changeset-release/develop branch, and attempts to create a new merge request even though changeset version produces no file changes. This results in a new empty release MR instead of publishing the already-versioned packages.
Steps to reproduce
-
Configure changesets-gitlab with a version command such as:
{
"scripts": {
"version": "changeset version",
"release": "changeset publish"
}
}
-
Use @changesets/cli v3.
-
Add a changeset and let changesets-gitlab create the version MR.
-
Merge the version MR into the target branch.
-
Run changesets-gitlab again with publishing configured.
-
Observe that it runs the version workflow again and tries to create an empty MR instead of publishing.
Expected behavior
After the version MR is merged, changesets-gitlab should detect that the repository contains versioned packages awaiting publication and execute the configured publish command.
It should not create a new release MR when the version command makes no changes.
Actual behavior
changesets-gitlab executes changeset version, receives the Changesets v3 output, finds no modified files, but still pushes the release branch and attempts to create another merge request:
$ pnpm run changesets-gitlab
[WARN] Unsupported engine: wanted: {"node":"^24.0.0"} (current: {"node":"v22.21.1","pnpm":"11.21.0"})
$ changesets-gitlab
::set-output name=published::false
::set-output name=publishedPackages::[]
setting git user
[command]/usr/bin/git config user.name gitlabbot
[command]/usr/bin/git config user.email gitlab[bot]@users.noreply.gitlab.com
setting GitLab credentials
[command]/usr/bin/git checkout changeset-release/develop
error: pathspec 'changeset-release/develop' did not match any file(s) known to git
[command]/usr/bin/git checkout -b changeset-release/develop
Switched to a new branch 'changeset-release/develop'
[command]/usr/bin/git fetch origin develop
From https://repo.risedev.at/epa/fdv/fdv-desktop/integrations/shared-packages
* branch develop -> FETCH_HEAD
[command]/usr/bin/git reset --hard origin/develop
HEAD is now at a9c971c Version Packages
[command]/usr/local/bin/pnpm run version
[WARN] Unsupported engine: wanted: {"node":"^24.0.0"} (current: {"node":"v22.21.1","pnpm":"11.21.0"})
$ changeset version
🦋 changeset v3.0.0
All files have been updated. Review them and commit at your leisure
[command]/usr/bin/git status --porcelain
[command]/usr/bin/git push origin HEAD:changeset-release/develop --force
Everything up-to-date
[]
creating merge request from changeset-release/develop to develop.
Description
After upgrading
@changesets/clito v3,changesets-gitlabno longer performs the release after the version MR has been merged.Instead, it runs the version command again, creates or resets the
changeset-release/developbranch, and attempts to create a new merge request even thoughchangeset versionproduces no file changes. This results in a new empty release MR instead of publishing the already-versioned packages.Steps to reproduce
Configure
changesets-gitlabwith a version command such as:{ "scripts": { "version": "changeset version", "release": "changeset publish" } }Use
@changesets/cliv3.Add a changeset and let
changesets-gitlabcreate the version MR.Merge the version MR into the target branch.
Run
changesets-gitlabagain with publishing configured.Observe that it runs the version workflow again and tries to create an empty MR instead of publishing.
Expected behavior
After the version MR is merged,
changesets-gitlabshould detect that the repository contains versioned packages awaiting publication and execute the configured publish command.It should not create a new release MR when the version command makes no changes.
Actual behavior
changesets-gitlabexecuteschangeset version, receives the Changesets v3 output, finds no modified files, but still pushes the release branch and attempts to create another merge request: