ENGINEERING

Block deploy PR merges in GitHub while error budget is exhausted

When a pull request targets a release branch, it checks the service's remaining SLO budget in Datadog and, if the budget is exhausted, posts a blocking review and a failing…

CategoryEngineering
Enginesim
Difficultyintermediate
Triggerevent
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerPR opened against release branchGitHubGitHub
  • ActionLook up service remaining budget in DatadogDatadogDatadog
  • LogicDecide pass or block vs budget floor
  • ActionSet failing GitHub status check on the PRGitHubGitHub
  • OutputPost blocking review with recovery estimateGitHubGitHub

What it does

This workflow puts the error budget directly in the pull request workflow. The moment a PR opens against a protected release branch, it looks up the target service's remaining SLO budget and, if the budget is below the safe floor, it blocks the merge with a failing GitHub status check and an explanatory blocking review comment.

When to use it

Use this when deploys happen by merging to a release branch and you enforce branch protection. It stops engineers from merging change into a service that is already out of budget, without requiring anyone to manually check a dashboard.

How it works

  1. 1A GitHub pull_request event fires when a PR opens or updates against the release branch.
  2. 2The workflow maps the changed paths to the affected service and queries Datadog for its remaining SLO budget.
  3. 3A logic step decides pass or block against the configured budget floor.
  4. 4If blocked, it posts a failing commit status check and a blocking review explaining the freeze.
  5. 5It comments on the PR with the current budget and recovery estimate so the author knows when to retry.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitHubRepos, issues, pull requests, actions.
  2. 2
    Connect DatadogMetrics, traces, log search.
  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.