DEVOPS

Open cleanup PRs for flags stuck at 100% for 30 days

Each week, finds feature flags that have served 100% rollout for 30+ days with no variation, then opens a GitHub PR that strips the flag and pins the winning branch.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerschedule
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerWeekly schedule fires the reaper run
  • ActionPull flag evaluation metrics from DatadogDatadogDatadog
  • LogicKeep flags at 100% with no change for 30+ days
  • ActionFind flag code references in GitHubGitHubGitHub
  • ActionOpen draft cleanup PR removing the flagGitHubGitHub
  • OutputPost opened PRs to Slack for triageSlack

What it does

This workflow hunts down feature flags that have been fully rolled out (100% on one variation) for at least 30 days and have stopped changing. For each one it opens a draft GitHub pull request that deletes the flag and hardwires the live code path, so the cleanup is a review-and-merge instead of an investigation.

When to use it

Run it when your flag system has become a graveyard — dozens of flags that shipped months ago but were never removed, each one adding a dead branch and a config lookup. It is ideal for teams that treat flags as temporary release tooling rather than permanent config.

How it works

A weekly schedule fires the run. The workflow pulls flag evaluation metrics from Datadog and computes, per flag, the percent served and days since the last variation change. A filter keeps only flags at 100% for 30+ days. For each survivor it looks up the flag's code references on GitHub, opens a draft PR that removes the flag guard and keeps the winning path, and posts the list of opened PRs to Slack for the on-call engineer to triage.

Set it up

What you configure once, before turning it on.

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