ENGINEERING

Locate deprecated calls in GitLab and draft a migration MR

When a high-volume deprecation appears in Sentry, searches the GitLab repo for every call site, uses OpenAI to draft the replacement edits.

CategoryEngineering
Enginesim
Difficultyadvanced
Triggerevent
Steps5
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerHigh-volume deprecation in SentrySentrySentry
  • ActionSearch GitLab repo for deprecated call sitesGitLabGitLab
  • LogicBranch on call-site count and ambiguity
  • ActionDraft replacement edits with OpenAIOpenAI
  • OutputOpen draft merge request in GitLabGitLabGitLab

What it does

For a deprecation that fires often enough to matter, this workflow finds where the deprecated API is actually called across your GitLab repository, drafts the mechanical replacement edits with OpenAI, and opens a draft merge request. An engineer reviews and finishes the work instead of starting from a blank diff.

When to use it

Use it for mechanical, repetitive deprecations (a renamed function, a changed argument, a moved import) where the bottleneck is finding all the call sites and writing boilerplate edits. Not for risky semantic migrations that need human design.

How it works

  1. 1Sentry fires when a deprecation crosses an event-volume threshold.
  2. 2The flow searches the GitLab repo for the deprecated symbol and gathers each matching file and line.
  3. 3A branch decides whether the count is small enough to auto-draft; large or ambiguous matches stop for manual review.
  4. 4OpenAI generates the replacement edits per file plus a migration summary.
  5. 5It opens a draft merge request on a new branch with the edits, the summary, and a link back to the Sentry issue.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect SentryErrors, performance, releases.
  2. 2
    Connect GitLabRepos, MRs, pipelines, registry.
  3. 3
    Connect OpenAIModels, embeddings, files.
  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.