Skip to content

chore: disable Vercel previews for Dependabot branches - #180

Merged
spizeck merged 1 commit into
masterfrom
chore/disable-dependabot-vercel-previews
Sep 27, 2026
Merged

spizeck merged 1 commit into
masterfrom
chore/disable-dependabot-vercel-previews

Conversation

@spizeck

@spizeck spizeck commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

Prevents Dependabot branches from creating Vercel Preview Deployments via git.deploymentEnabled in vercel.json.

Why dependabot/** and not dependabot/*: Vercel matches branch names with minimatch, where * never crosses /. Real Dependabot branches are nested — e.g. dependabot/npm_and_yarn/functions/eslint-10.11.0 — so a single-star dependabot/* pattern matches none of them. The ** glob is required for the exclusion to actually take effect.

A Preview Deployment triggers downstream integrations — for projects with the Vercel↔Neon integration, each preview provisions an isolated database branch. Blocking the deployment before it is created (rather than skipping the build with an Ignored Build Step, which still creates the deployment) avoids that infrastructure entirely.

Behavior

Push to Vercel deployment
main/master Production — unchanged
feat/*, fix/*, ordinary PR branches Preview — unchanged
dependabot/** None — no deployment, no preview integrations

Validation

  • vercel.json parses as valid JSON; all existing keys (crons, rewrites, functions, buildCommand) preserved
  • git.deploymentEnabled["dependabot/**"] === false; no overlapping true rule exists
  • Verified against real Dependabot branch names in this org (dependabot/npm_and_yarn/…, 3–4 segments deep)

Generated with Devin

Summary by Sourcery

Enhancements:

  • Disable Vercel preview deployments for all Dependabot branches while leaving production and other preview deployments unchanged.

@sourcery-ai

sourcery-ai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates vercel.json to prevent Vercel from creating deployments—and therefore downstream preview infrastructure—for nested Dependabot branches, while leaving production and ordinary preview behavior unchanged.

File-Level Changes

Change Details Files
Disable Vercel Preview Deployments for all Dependabot branch paths using a recursive glob exclusion.
  • Add a git.deploymentEnabled rule mapping dependabot/** to false.
  • Preserve existing Vercel configuration for production deployments, ordinary previews, cron jobs, rewrites, functions, and build settings.
vercel.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@vercel

vercel Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
seasaba-web Ready Ready Preview Sep 27, 2026 11:25pm UTC

Request Review

@sourcery-ai sourcery-ai Bot 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@spizeck
spizeck merged commit 35c135a into master Sep 27, 2026
9 checks passed
@spizeck
spizeck deleted the chore/disable-dependabot-vercel-previews branch September 27, 2026 23:34

This branch was successfully deployed

1 active deployment
Preview — 20e0097c Deployed Sep 27, 2026 by vercel[bot]
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.

1 participant