Repository navigation
fix(bundler-plugins): Skip default commit association on Vercel builds that --auto can't resolve - #26320
Merged
betegon merged 4 commits intoNov 16, 2026
Conversation
…on Vercel builds
On Vercel builds that are not production, the default `setCommits` fell
through to `{ auto: true }`. Vercel builds have no `.git`, so the CLI call
always failed and was swallowed. Skip commit association there instead,
which is what the existing production-only comment intended.
Production detection now uses `getVercelEnv()`, the same as deploy
detection.
Co-Authored-By: bete <28983162+betegon@users.noreply.github.com>
Contributor
size-limit report 📦Compared: 43297d1 (PR test merge using develop at f49009b) Against: f49009b (develop) · base run #65866 ✅ Baseline matches: this diff contains only this PR's changes.
|
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 4 not successful, 56 successful. See the run.
Successful checks
|
…remote Only skip the default commit association on non-production Vercel builds when there is no `origin` remote. Vercel's own builders have none, so `--auto` always failed there. Builds that do have one, such as `vercel build` / `vercel deploy --prebuilt` in GitHub Actions, keep `--auto` as before. Restore the production gate on the `VERCEL_GIT_*` branch so preview builds with a remote never associate the PR's stem commits. Co-Authored-By: bete <28983162+betegon@users.noreply.github.com>
…ository variables Since CLI 0.48, `set-commits --auto` also resolves the repository from CI variables such as GITHUB_REPOSITORY when there is no `origin` remote. Only skip the default on non-production Vercel builds when neither is available, so `vercel build` in another CI without a git checkout keeps associating commits. Co-Authored-By: bete <28983162+betegon@users.noreply.github.com>
betegon
marked this pull request as ready for review
November 12, 2026 20:51
javascript-sdk-gitflow
Bot
requested review from
JPeer264,
Lms24 and
nicohrubec
November 12, 2026 20:51
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 a4768c4. Configure here.
In GitHub Actions GITHUB_REPOSITORY is set, so the preview test with a git remote passed from CI variables without running the origin check.
timfish
approved these changes
Nov 14, 2026
mydea
approved these changes
Nov 16, 2026
betegon
deleted the
fix/bundler-plugins-skip-auto-commits-vercel-preview
branch
November 16, 2026 08:02
51 tasks done
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.

Why: With no
setCommitsset, non-production Vercel builds fall back to{ auto: true }. Vercel's own builders have nooriginremote and no other CI variables, and the CLI only readsVERCEL_GIT_*on production builds, so thatset-commits --autocall always fails there. The plugin swallows the error, but the new CLI reports each failure to its own telemetry, where Vercel builds make up about 40% of the "no repository for--auto" errors. Those builds now skip commit association.The skip only happens when
--autohas nothing to read: nooriginremote and none of the CI repository variables the CLI falls back to (GITHUB_REPOSITORY,CI_PROJECT_PATH, ...). Builds that have either, such asvercel build/vercel deploy --prebuiltin GitHub Actions, keep--autoexactly as before, so a build that associated commits today still does. TheVERCEL_GIT_*branch stays production-only, as the existing comment says, and production detection now usesgetVercelEnv()(VERCEL_TARGET_ENV, falling back toVERCEL_ENV), the same check deploy detection below it uses. An explicit usersetCommitsstill wins.Before / after: No user has to change anything. The only builds that behave differently are ones where
--autowas already failing quietly.VERCEL_TARGET_ENV=production)VERCEL_GIT_*VERCEL_ENV=production--autofails on Vercel's builders, so no commitsVERCEL_GIT_*--autofails quietly, no commitsvercel build/--prebuiltin GitHub Actions)--autoworks--autoworks.git(Docker), CI variables set--autouses CI variables.git, no CI variables--autofails quietlyrelease.setCommitsset explicitlyPreview commits stay opt-in, because a preview's previous commit is the PR's stem commit and Sentry would notify the authors of unrelated PRs. Users who want them anyway can set:
Unsure about: The CI variable list copies the CLI's
--autofallback (packages/cli/src/lib/ci.tsin getsentry/toolkit), so it has to stay in sync when that list grows. This adds at most onegitcall per build, and only on non-production Vercel builds.via @betegon.
--
View Session [Sentry]