Skip to content

fix(vercel): disable previews for release/ and other unlisted branch prefixes - #66

Merged
Shaan-alpha merged 1 commit into
mainfrom
fix/vercel-preview-release-branches
Jul 31, 2026
Merged

fix(vercel): disable previews for release/ and other unlisted branch prefixes#66
Shaan-alpha merged 1 commit into
mainfrom
fix/vercel-preview-release-branches

Conversation

@Shaan-alpha

Copy link
Copy Markdown
Owner

Fixes the failing Vercel check on #65. The cause was in our own config, not the platform — I had earlier guessed at an unprovisioned preview environment, which was wrong.

What actually happened

vercel.ts already disables preview deployments, by enumerating branch prefixes:

feat/** fix/** chore/** docs/** ops/** style/** refactor/** test/** dependabot/**

release/** was not on that list. So release/v1.0.11-prep was the first branch in months to trigger a preview, and it failed at resource provisioning — which is why #59#64 (all fix/**) showed no Vercel check at all and #65 did. GitHub has recorded exactly 2 preview deployments for this repo, ever: both from #65.

Why not just turn previews off wholesale

Two obvious-looking fixes are both wrong, and the comment now says so:

  • deploymentEnabled: false (boolean form) — per Vercel's docs this "prevents any branch from triggering a deployment", main included. That stops production shipping.
  • '*': false — minimatch's single * does not cross /, so it matches the single-segment main. Same outcome. This is the identical trap that made the old dependabot/* entry silently never match, which the existing comment already records.

So it stays deny-by-enumeration. main is deliberately absent from the map — unlisted branches default to true, and that omission is exactly what keeps production deploying.

Change

Adds release/**, plus hotfix/**, revert/**, perf/**, build/**, ci/** so the next unlisted prefix doesn't repeat this. Documents the design and its one real cost: an unlisted prefix silently gets a preview, so the list has to track the prefixes actually in use. That residual fragility is inherent to the object form — worth knowing rather than papering over.

No behaviour change for any existing branch; main and production are untouched.

Verification

npx tsc --noEmit -p . clean — the same command CI's "Config (vercel.ts typecheck)" job runs.

This branch is fix/**, so it is itself preview-disabled — the check that failed on #65 should simply not appear here.

We do not use preview deployments -- GitHub Actions CI is the gate -- but
deploymentEnabled is deny-by-enumeration, so any prefix missing from the
map silently gets one. release/** was missing, which is why the v1.0.11
release-prep PR (#65) was the first branch in months to trigger a preview,
and it failed at resource provisioning.

Adds release/, hotfix/, revert/, perf/, build/ and ci/, and documents why
the safe-looking alternatives are wrong: the boolean form
deploymentEnabled: false disables every branch including main and would
stop production shipping, and a bare '*': false matches the
single-segment main for the same reason minimatch made dependabot/* fail.
main stays deliberately absent from the map -- unlisted defaults to true,
and that omission is what keeps production deploying.
Copilot AI review requested due to automatic review settings July 31, 2026 08:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Shaan-alpha
Shaan-alpha merged commit a08d4a5 into main Jul 31, 2026
5 checks passed
@Shaan-alpha
Shaan-alpha deleted the fix/vercel-preview-release-branches branch July 31, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants