How Campaigns use workflows
Campaigns are powered by the Codemod workflows, which orchestrates multi-step code migrations at scale.Workflow structure
A workflow defines what transformations to run and how they’re orchestrated:- Nodes are the primary execution units that represent a stage in your migration. Nodes can depend on other nodes, run automatically or require manual approval, and fan out across matrix dimensions.
- Steps are atomic actions within a node. Each step performs one transformation or command (e.g., run a JSSG codemod, execute a shell script, call an AI agent).
- Tasks are runtime instances of nodes. When a Campaign runs, the engine creates tasks for each node. For matrix strategies, a single node can spawn multiple parallel tasks (e.g., one per team or shard).
Why this matters for large-scale migrations
The workflow engine handles the complexity of coordinating transformations:- Dependency-aware scheduling: Nodes execute in the correct order based on their dependencies
- Parallel execution: Independent nodes and matrix tasks run concurrently
- Resumable state: Progress persists across runs, so interrupted migrations can continue where they left off
- Mixed transformation types: Combine deterministic AST codemods with AI-powered fixups and shell scripts in a single workflow
Creating a Campaign
Choose a codemod
Navigate to Campaigns and click Create Campaign. Search the Codemod Registry by name or keyword, then select the codemod you want to run. Use the version picker to choose a specific version or default to the latest.Pro codemods are available to Pro and Enterprise plan customers.
Select target repository
Open the repository selector and choose a repository from your connected GitHub or GitLab accounts.
Codemod needs access to your repositories via the GitHub App or GitLab integration. If no repositories appear, connect your account first.
Configure parameters
If the codemod accepts configuration, a dynamic form is generated from its schema. Fill in the fields. The form supports text inputs, numbers, booleans, dropdowns, and secrets.Parameters make workflows reusable and configurable for different contexts. For example:
- Specify which library version to migrate to
- Configure team-specific behavior or file paths
- Pass API keys or tokens needed by the transformation
- JSSG transforms: Access parameters via
options.params. See JSSG documentation for details. - Shell steps: Parameters are available as environment variables, each prefixed with
PARAM_. - Nested codemod steps: Parameters are inherited via environment variable forwarding.
GitHub Integration
Install the Codemod GitHub App to target your repositories.
GitLab Integration
Set up group access tokens for GitLab repositories.
Managing a Campaign
Once a Campaign is running, the detail page gives you full visibility into execution progress and lets you manage individual tasks.Campaign dashboard
The Campaign dashboard provides two primary views for monitoring execution:1. Map view (workflow graph)
An interactive DAG showing workflow nodes as connected boxes. The graph visualizes dependencies between nodes and shows the execution order. Click any node to expand it and see:- The steps within that node and their individual status
- The tasks spawned by that node (one or more for matrix strategies)
- Logs and execution details for each step
2. Table view
A detailed breakdown with one row per task, showing:- Task status and the node it belongs to
- Step-by-step execution state within each task
- Assignee, PR links, and available actions
- For matrix nodes, each matrix combination appears as a separate task row
- Pull request links. Each completed task shows the PRs it created, with state indicators and direct links to GitHub or GitLab.
- Real-time updates. Status changes, task creation events, and PR additions stream live without page refresh.
Build logs
Click View Logs on any task to open the log panel. Logs stream in real-time and support full-text search, log level filtering, and ANSI color rendering.Task statuses
Tasks move through simple status states likeTodo, In Review, Done, or Won't Do, which you can update from the status dropdown.
If a task fails (e.g. a network timeout or build error), you can re-run it individually from the task’s dropdown menu without re-running the entire Campaign. Only tasks in a failed or errored state can be re-run.
To stop an active run, click Cancel Run. Completed tasks are not affected, but in-flight tasks will be terminated.
Project management integration
Link a Campaign to a Jira epic for bidirectional task sync. When task statuses change in Codemod, they update in your project management tool, and vice versa.| Campaign status | Jira status |
|---|---|
| Todo | To Do |
| In Review | In Progress |
| Done | Done |
| Won’t Do | Won’t Do |
Parameters
Parameters unlock powerful patterns for managing migrations at scale:Reusable workflows
Define a workflow once and run it across different contexts by parameterizing variable parts:Dynamic behavior
Parameters can control conditional execution within workflows:- Skip certain steps based on configuration
- Adjust file patterns per repository
- Enable or disable AI-powered fixups
Secrets management
For workflows that need API keys, tokens, or other credentials:- Store secrets at the organization level in Codemod
- Reference them in parameters using
${secrets.secretName} - Secrets are injected at runtime and never exposed in logs
Parameter Reference
Complete parameter schema options and access patterns.
Next steps
For multi-step migrations, you can design workflows usingworkflow.yaml to define nodes, dependencies, matrix strategies, and parameters. Pro and Enterprise customers can also request custom workflows built by the Codemod team.