DEVOPS

Vercel bundle-size delta to GitLab MR with trend

On every Vercel preview deploy, compares the build's bundle size against the target branch baseline and posts a delta-with-trend comment on the matching GitLab merge request.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerwebhook
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerVercel preview deployment succeededVercelVercel
  • ActionSum client bundle bytes from build outputVercelVercel
  • ActionFetch target-branch baseline sizeGoogle BigQueryBigQuery
  • LogicCompute byte/percent delta and trend marker
  • ActionResolve open MR for the branchGitLabGitLab
  • OutputPost delta-with-trend comment on the MRGitLabGitLab

What it does

Each time Vercel finishes a preview build for a branch, this workflow measures the produced JavaScript bundle size, looks up the baseline size for the merge request's target branch, computes the byte and percentage delta, and posts a comment on the open GitLab MR. The comment shows the current size, the change versus baseline, and an arrow trend so reviewers see budget impact without leaving the MR.

When to use it

Use it when your app deploys previews on Vercel and reviews merge requests in GitLab, and you want bundle-size accountability enforced inline on every MR instead of in a separate dashboard nobody checks.

How it works

  1. 1Vercel `deployment.succeeded` webhook fires for a preview build.
  2. 2Read the deployment's build output and sum the client bundle bytes via the Vercel API.
  3. 3Query BigQuery for the stored baseline size of the MR target branch.
  4. 4Compute absolute and percent delta and pick an up/down/flat trend marker.
  5. 5Find the open GitLab MR for the source branch.
  6. 6Post or update a comment on the MR with size, delta, and trend.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect VercelDeploys, runtime logs, analytics.
  2. 2
    Connect BigQueryDatasets, queries, schemas.
  3. 3
    Connect GitLabRepos, MRs, pipelines, registry.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    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.