ENGINEERING

GitLab MR uncovered-diff line annotator

On every GitLab merge request pipeline, compares the new coverage report against the diff and posts inline MR comments on each added or modified line that has no test coverage.

CategoryEngineering
Enginesim
Difficultyintermediate
Triggerwebhook
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitLab MR pipeline succeedsGitLabGitLab
  • ActionFetch MR diff + coverage artifactGitLabGitLab
  • LogicCompute uncovered added/modified lines
  • LogicSkip files with full coverage
  • OutputPost inline comments on uncovered linesGitLabGitLab

What it does

Every time a merge request pipeline finishes, this workflow finds the exact lines a developer added or changed and that the test suite never executed, then drops an inline comment on each one inside the MR diff. Reviewers see uncovered code right where it lives instead of digging through a coverage dashboard.

When to use it

Use it when your team wants coverage feedback at review time rather than after merge. It is most valuable for repositories with meaningful suites where untested new logic is the main regression risk, and where you would rather nudge in-thread than block the pipeline.

How it works

  1. 1A GitLab pipeline-success webhook fires for a merge request pipeline.
  2. 2The flow fetches the MR diff and the pipeline's Cobertura/LCOV coverage artifact from GitLab.
  3. 3It intersects added/modified line numbers per file with the set of executed lines, producing the uncovered-diff set.
  4. 4A logic step skips files with zero uncovered diff lines.
  5. 5For each remaining line it posts an inline discussion on the MR, then writes one summary note listing total uncovered new lines.

Set it up

What you configure once, before turning it on.

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