DEVOPS

Score PR Deploy Risk From Diff Size and Touched Paths

When a pull request opens or updates, it scores release risk from the diff (lines changed, files touched.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerwebhook
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerPR opened or updated (GitHub webhook)GitHubGitHub
  • ActionFetch PR diff and changed filesGitHubGitHub
  • LogicCompute weighted risk score from diff
  • LogicMap score to Low / Medium / High
  • OutputApply risk label and post verdict commentGitHubGitHub

What it does

This workflow inspects every pull request the moment it opens or gets new commits, computes a deploy-risk score from the diff, and writes a clear Low/Medium/High verdict directly onto the PR as a label and comment so reviewers see risk before they approve.

When to use it

Use it when your team merges fast and you want a consistent, automatic signal for which PRs deserve a closer review or a staged rollout — without relying on each author to self-assess.

How it works

  1. 1A GitHub pull_request webhook fires on opened or synchronize events.
  2. 2The flow fetches the PR diff and file list from the GitHub API.
  3. 3A scoring step weights additions, deletions, file count, and high-blast-radius paths (db migrations, auth, payment, infra config) into a 0-100 risk score.
  4. 4A branch maps the score into Low, Medium, or High tiers.
  5. 5The flow applies the matching risk label and posts a comment summarizing what drove the score back onto the PR.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitHubRepos, issues, pull requests, actions.
  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.