Repository navigation
fix(git): match remote tags by full ref instead of suffix - #2387
Merged
beeequeue merged 2 commits intoNov 20, 2026
Merged
Conversation
`git ls-remote --tags origin <pattern>` treats a pattern without a leading `refs/` as a suffix to match against the tail of the ref name, so looking for `shacl-playground@2.0.0` also found `refs/tags/@zazuko/shacl-playground@2.0.0` and the release was considered already tagged on the remote. Matching against `refs/tags/<tag>` only returns the exact tag. The tag lookup now also takes the repo directory like the other helpers in the package.
🦋 Changeset detectedLatest commit: fcae2fd The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
👷 Deploy request for changesets pending review.Visit the deploys page to approve it
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2387 +/- ##
==========================================
+ Coverage 87.47% 87.65% +0.17%
==========================================
Files 78 78
Lines 2971 2972 +1
Branches 851 853 +2
==========================================
+ Hits 2599 2605 +6
+ Misses 337 332 -5
Partials 35 35 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
beeequeue
reviewed
Nov 19, 2026
beeequeue
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #2386.
remoteTagExistspasses the tag name togit ls-remoteas a bare pattern.git ls-remotematches such a pattern against the tail of the ref name, soshacl-playground@2.0.0also matchedrefs/tags/@zazuko/shacl-playground@2.0.0. When a monorepo publishes a scoped package whose tag ends with an unscoped package's tag,splitByTagStatuscounts the unscoped release as already tagged on the remote and skips its git tag, leaving the release untagged in git while the package is published.Matching
refs/tags/<tag>instead only returns the exact ref:Changes
remoteTagExists(tagStr, cwd)matches the full ref and takes the repo directory, liketagExistsand the other helpers in@changesets/git. The call site insplitByTagStatusalready hascwdon hand.-lflag, whichls-remotedoes not take (git tag -ldoes).@scope/pkg@1.0.0tag on a fixture remote and assertspkg@1.0.0is not reported as existing, then that it is once the exact tag is added.Verification
packages/git/src/index.test.ts: 37/37 pass; the new test fails onmain(expected true to be false) and passes with the change.packages/cli:publish-planandutilssuites 26/26 pass.tsc,eslint,oxfmt --checkclean.Changeset is a patch for
@changesets/gitand@changesets/cli.