DEVOPS

On-Merge Flag Audit: Nudge Owners When Their Flag Goes Stale

When a merge request lands, scans the diff for newly-introduced or long-lived feature flags past their kill-date and posts a threaded GitLab note plus a Slack DM to the flag owner.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerwebhook
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitLab merge-event webhook firesGitLabGitLab
  • ActionFetch MR diff and extract flag referencesGitLabGitLab
  • ActionLook up kill-dates in registryPostgreSQLPostgres
  • LogicBranch if any referenced flag is overdue
  • OutputComment on MR and DM owner in SlackSlack

What it does

Reacts to every merged GitLab MR, scans the touched files for feature-flag references, and flags any whose registered kill-date has already passed. It leaves a note on the MR and direct-messages the owner so cleanup happens at the moment the code is fresh in their mind.

When to use it

Use this to keep flag debt from compounding silently. Catching stale flags at merge time, while a developer is already in the file, is far more likely to result in actual removal than a batch report they ignore.

How it works

  1. 1A GitLab merge-event webhook triggers the workflow.
  2. 2It fetches the MR diff and extracts every flag key referenced in the changed files.
  3. 3It looks each key up in the Postgres registry and compares kill-dates against today.
  4. 4A branch decides whether any referenced flag is overdue.
  5. 5If so, it posts a threaded comment on the MR listing the stale flags and sends the owner a Slack DM with the removal checklist.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitLabRepos, MRs, pipelines, registry.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  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.