ENGINEERING

Flag Reaches 100%, Auto-Draft Removal PR

Listens for a rollout-completed webhook from your flag platform, waits out a configurable bake period.

CategoryEngineering
Enginesim
Difficultyadvanced
Triggerwebhook
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerRollout-completed webhook receivedHTTP webhook
  • LogicConfirm 100% and set bake deadline
  • ActionRe-fetch flag state to confirm stabilityPostgreSQLPostgres
  • ActionSearch repo for flag referencesGitHubGitHub
  • ActionGenerate flag-removal diffOpenAI
  • OutputOpen draft removal PRGitHubGitHub

What it does

Reacts the instant a flag hits full rollout rather than waiting for a nightly sweep. When a flag completes its ramp, it schedules a bake check and, if the flag stays at 100% with no errors, drafts the removal PR immediately.

When to use it

Use it when your flag platform emits rollout-completion webhooks and you want cleanup PRs queued event-by-event instead of in a batch. Ideal for high-velocity teams that flip many flags a week.

How it works

  1. 1The flag platform posts a rollout-completed webhook to the workflow.
  2. 2A logic step confirms the payload reports 100% and records the bake deadline.
  3. 3After the bake period, re-fetch flag state from Postgres to confirm it never regressed or threw kill-switch events.
  4. 4If stable, search GitHub for the flag's references.
  5. 5Generate the flag-removal diff with OpenAI.
  6. 6Open a draft PR with the cleanup changes and a link back to the rollout record.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect HTTP webhookTrigger any URL on agent actions.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Connect GitHubRepos, issues, pull requests, actions.
  4. 4
    Connect OpenAIModels, embeddings, files.
  5. 5
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  6. 6
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  7. 7
    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.