Repository navigation
fix(cli): Use Sentry's repository name when set-commits --commit only differs in form - #1948
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ecefc07. Configure here.
betegon
force-pushed
the
cli/set-commits-correct-repo
branch
from
November 4, 2026 17:34
352dc2f to
24bb50f
Compare
… differs in form Sentry matches --commit repository names exactly, so a name that differs from Sentry's only in case or form (for example the VERCEL_GIT_REPO_OWNER/ VERCEL_GIT_REPO_SLUG that @sentry/bundler-plugins passes) fails with 'Invalid repository names'. When every rejected name matches a Sentry repository the same way --auto matches, retry once with Sentry's names and warn. Otherwise keep explaining the error. Co-Authored-By: Miguel Betegon <28983162+betegon@users.noreply.github.com> Co-Authored-By: bete <miguel.betegon@sentry.io>
correctRefRepositories logged a warning for each rejected name it could replace, then gave up when a later name had no match. Those warnings said Sentry's name was used even though no retry ran. Collect the replacements first and warn only once every rejected name matched. Co-Authored-By: Miguel Betegon <28983162+betegon@users.noreply.github.com> Co-Authored-By: bete <miguel.betegon@sentry.io>
The repository quality lint (no-async-catch-callback) rejects async callbacks passed to .catch(). Await the call in try/catch instead so the retry and error path stay in async stack traces. Co-Authored-By: Miguel Betegon <28983162+betegon@users.noreply.github.com> Co-Authored-By: bete <miguel.betegon@sentry.io>
sentry-junior
Bot
force-pushed
the
cli/set-commits-correct-repo
branch
from
November 4, 2026 17:46
24bb50f to
d17f673
Compare
betegon
self-requested a review
November 4, 2026 17:46
sentry-junior
Bot
changed the base branch from
cli/set-commits-silence-repo
to
main
November 4, 2026 17:49
betegon
approved these changes
Nov 4, 2026
7 tasks done
This branch was previously deployed
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.

Part of the CLI-2SK work. The branch is based on
mainafter #1902. #1903 was closed and is not part of this change.Sentry matches
--commitrepository names exactly (Release.set_refs,name__in). A name that refers to the same repository but is written differently, for example in a different case, fails withInvalid repository names. On Vercel production builds,@sentry/bundler-pluginspassesVERCEL_GIT_REPO_OWNER/VERCEL_GIT_REPO_SLUGas-is, which is one way to end up with such a name.Change. When the server rejects
--commitrefs as invalid repository names, the CLI now looks up each rejected name with the same matching--autouses (findSentryRepository: case-insensitive name, URL path, GitLab display names). If every rejected name matches a Sentry repository, the CLI retries once with Sentry's names and prints a warning for each name it replaced. If any rejected name has no match, or the lookup fails, the command fails with #1902's error and next steps, unchanged. The commit range (PREV..SHA) the caller passed is kept.Before / after
The CLI was run from source against a local stand-in for the Sentry API that rejects names the way
Release.set_refsdoes. "Before" ismainat08fac06c(#1902), "after" is this branch.Same repository, different case (org
acmehasacme/web)Before
After
The retry sends
acme/webwith the sameabc1234..def5678range.One name matches, another has no match (org
acmehas onlyacme/web)Before and after are the same. No retry runs, and no "Using ..." warning is printed:
Org has no repositories
Before and after are the same:
Repository not in Sentry, similar names exist (org
acmehasacme/website,acme/web-app,acme/api)Before and after are the same:
Why the CLI and not only the plugin
The fix applies to every
--commitcaller: the bundler plugin, CI scripts and people. The plugin keeps passing Vercel's previous deployment SHA, so the range doesn't change.Tests
correctRefRepositories: case-only correction (with its warning), no match, a later name with no match (no warning, no retry), other errors (no lookup), lookup failure.set-commits --commitretries with the corrected refs.pnpm run lintpasses. I did not run the full suite.via @betegon.
--
View Session [Sentry]