DEVOPS

Open GitLab MRs that auto-remove expired feature-flag branches

For each flag past its kill-date, an agent rewrites the code to keep the shipped branch, deletes the dead branch and the flag check.

CategoryDevOps
Enginepaperclip
Difficultyadvanced
Triggerschedule
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerScheduled run with expired flag list
  • ActionRead flag references and rollout stateGitLabGitLab
  • LogicDetermine surviving branch and edits to make
  • ActionCommit removal to a per-flag branchGitLabGitLab
  • ActionOpen draft merge request, tag reviewerGitLabGitLab
  • OutputLink the originating Linear cleanup ticketLinearLinear

What it does

Does the tedious removal work itself. Given a flag whose kill-date has passed and whose rollout was 100%, an agent edits the affected files to inline the live branch, strips the now-dead `else` path and the flag import, then opens a draft merge request scoped to that one flag.

When to use it

When the cleanup backlog is real removal work, not just tickets. Best for flags that fully shipped and just need the scaffolding deleted. The draft MR keeps a human in the loop for the final merge.

How it works

  1. 1A schedule or manual run provides the list of expired, fully-rolled-out flags.
  2. 2The agent reads each flag's references and determines the surviving branch from its rollout state.
  3. 3It rewrites the code to inline that branch and remove the flag check, import, and config entry.
  4. 4It commits the change to a new branch per flag and opens a draft GitLab merge request.
  5. 5It tags the owning reviewer and links the originating cleanup ticket.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitLabRepos, MRs, pipelines, registry.
  2. 2
    Connect LinearIssues, projects, cycles, triage.
  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.