ENGINEERING

Default-branch coverage-drop PagerDuty alert

Watches default-branch pipelines and, when total coverage falls below a hard floor or drops sharply versus the last run, opens a PagerDuty incident and notes the responsible…

CategoryEngineering
Enginesim
Difficultyadvanced
Triggerwebhook
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerDefault-branch pipeline succeedsGitLabGitLab
  • ActionRead coverage + head commitGitLabGitLab
  • ActionFetch previous run coveragePostgreSQLPostgres
  • LogicCheck floor and run-over-run drop
  • ActionOpen PagerDuty incident on breachPagerDutyPagerDuty
  • OutputRecord run coveragePostgreSQLPostgres

What it does

This workflow guards your main branch. When a default-branch pipeline reports coverage under a configured floor, or a sudden drop versus the previous successful run, it opens a PagerDuty incident tagged with the offending commit and author so the on-call owner can triage immediately.

When to use it

Use it when coverage on `main` is a release-quality signal you treat as an operational metric. It fits teams that already route engineering alerts through PagerDuty and want a coverage cliff to page someone, not just file a quiet note.

How it works

  1. 1A GitLab default-branch pipeline-success webhook triggers the flow.
  2. 2It reads the pipeline's total coverage and the head commit metadata.
  3. 3It fetches the previous successful run's coverage from Postgres.
  4. 4A logic step checks both the absolute floor and the run-over-run drop.
  5. 5On breach it opens a PagerDuty incident with the commit, author, and delta.
  6. 6It records the new run's coverage in Postgres as the next comparison point.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitLabRepos, MRs, pipelines, registry.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Connect PagerDutyIncidents, on-call, escalations.
  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.