Automate large-scale code changes

batch changes

Keep your code up to date, fix critical security issues, and pay down tech debt across all of your repositories with Batch Changes.

Change code everywhere with a single declarative file

Batch Changes gives you a declarative structure for finding and modifying code across all of your repositories. With a simple UI, it is easy to track and manage all of your changesets through checks and code reviews until each change is merged.

Graphic of many developers individually updating repositories, while some are not updating their repositories.
Asking developers to update repositories
Graphic of a single developer updating a lot of repositories.
Using Batch Changes to update repositories

Search, define, execute, and track code changes

  • Find all occurrences of code to change with Sourcegraph universal code search
  • Programmatically define changes by creating a declarative specification file
  • Execute specifications via a lightweight CLI
  • Track changeset lifecycle status across multiple code hosts via the Sourcegraph UI
Search, define, execute, and track code changes
The ability to automate downstream changes that Sourcegraph Batch Changes provides is a key capability for reducing the hidden burden of updates pushed across teams and enabling us to increase our engineering velocity.
Jared Hodge, Sr. Manager Developer Experience
Indeed

Track changes from creation to merge

Tracking changes to many repositories requires spreadsheets and manual labor.

With Batch Changes, you can automatically track changeset lifecycle status, like check state, reviews, and merge status via the Sourcegraph UI so you can get the changesets merged.

How developers are using Batch Changes

Configuration
Refactoring
Security

Quickly edit every CI, build, and other configuration files to make changes such as altering steps, migrating versions, or changing base images.

Batch spec for updating the username in Circle CI configurations

Use language-aware tooling of your choice to perform complex refactors like updating an API and its function calls or replacing libraries entirely.

Batch spec for using Comby to refactor Go code

Refactor code to replace insecure functions, update vulnerable packages, or modify container configurations across hundreds of repositories.

Batch spec for pinning Docker base images to specific versions
Sourcegraph Batch Changes gives us the confidence we need to understand the total impact of large-scale code changes before we make them. This enables the entire team to make more impactful decisions more often.
Trent Grover, Director of Architecture - Client Technologies, Workiva
Workiva

See Batch Changes in action

Try Sourcegraph for free today

Experience code intelligence with a free 30-day trial of Sourcegraph for you and your team.