Automations/Maintenance/Migrate deprecated API usage

Migrate deprecated API usage

Finds deprecated API usage, migrates call sites, runs tests, and opens a PR.

Use this template

How to use this template

  1. 1Click "Use this template" or create a new automation in Ona
  2. 2Set your trigger (manual, scheduled, or event-based)
  3. 3Copy each step below into the automation builder
  4. 4Customize the prompts for your specific use case

What this does

  • Automatically detect deprecated API calls
  • Migrate to recommended replacements
  • Validate migrations with tests
  • Open PRs with migration details

Workflow

Trigger

Manual trigger

Select the repository and specify the deprecated API to migrate from and to.

Prompt

Find deprecated usage

Search the entire repository for all usages of the deprecated API: imports, function calls, type references, and configuration.

Prompt

Plan migration

Determine the correct replacement for each usage. Handle changed signatures, renamed parameters, and different return types.

Prompt

Apply migration

Update imports, replace function calls, adjust types, and update configuration files across all affected files.

Shell Script

Run tests

npm test || go test ./... || yarn test || echo "Tests completed"
Pull Request

Open PR

Submit a pull request with the migrated code and migration details.

More automations that supercharge your development workflow with Ona.

Start shipping with Ona

No commitment. No setup. Just start.

Copied to clipboard!

This website uses cookies to enhance the user experience. Read our cookie policy for more info.