DEVOPS

Open GitLab MRs that prune stale flags and their config entries

Finds flags at 100% for 30+ days, then opens a GitLab merge request that removes both the code guards and the flag's definition from your flag-config file.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerschedule
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerWeekly schedule triggers the run
  • ActionRead rollout state and ages from DatadogDatadogDatadog
  • LogicFilter to flags at 100% for 30+ days
  • ActionFind code refs and config entry in GitLabGitLabGitLab
  • ActionOpen MR pruning code guards and config keyGitLabGitLab
  • OutputList new MRs in Slack for reviewSlack

What it does

This workflow produces complete flag removals on GitLab. Many cleanups delete the code branch but leave the flag definition rotting in a config file. This finds flags at 100% for 30+ days and opens a single merge request that strips both the code guards and the matching entry in your flag-config file, so the flag disappears from the codebase entirely.

When to use it

Use it if your team is on GitLab and stores flag definitions in a tracked config file (JSON, YAML, or similar) alongside code. It is the right fit when half-done removals — code gone but config orphaned — are the recurring mess you want to stop creating.

How it works

A weekly schedule triggers the run. The workflow reads rollout state and last-change dates from Datadog and filters to flags at 100% for 30+ days. For each stale flag it searches the GitLab repo for both the code references and the config-file entry. It creates a branch, removes the guards and deletes the config key, and opens a merge request describing the flag and its rollout history. A Slack note lists the new MRs for review.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect DatadogMetrics, traces, log search.
  2. 2
    Connect GitLabRepos, MRs, pipelines, registry.
  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.