DEVOPS

Vercel Build-Budget Breach PR Gate

When a preview build exceeds the agreed build-time budget, posts a failing check and a comment on the PR explaining the overage and which dependency or file change likely caused…

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerwebhook
Steps4
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerVercel preview deployment succeeded webhookVercelVercel
  • LogicCompare duration against per-branch build budget
  • ActionInspect PR diff for heavy deps / large filesGitHubGitHub
  • OutputSet failing check + post overage comment on PRGitHubGitHub

What it does

This workflow enforces a build-time budget on pull requests. When a Vercel preview build for a PR exceeds the configured budget, it sets a failing commit status and comments on the PR with the overage amount and a diff-based guess at the cause — a new heavy dependency, a large new file, or expanded type-check scope.

When to use it

Use it to stop build-time regressions at review time rather than after merge. Ideal for teams that treat build duration as a budget with a hard ceiling and want PRs blocked when they blow past it.

How it works

  1. 1A Vercel preview-deployment-succeeded webhook fires for a PR build.
  2. 2A logic step compares the build duration against the per-branch budget.
  3. 3If within budget, it sets a passing check and exits.
  4. 4If over budget, it inspects the PR diff for added dependencies and large files via GitHub.
  5. 5It posts a failing commit status plus an explanatory PR comment naming the likely culprit and the overage in seconds.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect VercelDeploys, runtime logs, analytics.
  2. 2
    Connect GitHubRepos, issues, pull requests, actions.
  3. 3
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  4. 4
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  5. 5
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.