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.

Batch changes illustration

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 a single developer updating a lot of repositories.

Search, define, execute, and track code changes

Find all occurrences of code to change, programmatically define changes, and execute via a lightweight CLI. Track changeset lifecycle status across multiple code hosts via the Sourcegraph UI.

Teams move faster with Batch Changes
Completions Brand Icon

Jared Hodge

Senior Manager Developer Experience, Indeed

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.

Completions Brand Icon

Trent Grover

Director of Architecture: Client Technologies, Workiva

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.

Track changes from creation to merge

Eliminate manual spreadsheet tracking. Automatically track changeset lifecycle status, like check state, reviews, and merge status via the Sourcegraph UI.

How developers are using Batch Changes

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

name: update-circle-ci-docker-user
description: Changes the Docker Hub username used for Circle CI

# Search for repositories containing a circle-ci.yml file with the old usename
on:
  - repositoriesMatchingQuery: mydockerhub-user file:circle-ci.[yaml|yml]

# In each repository
steps:
  # replace the old with the new username in the found files
  - run: |
      for file in “${{ join repository.search_results_paths “ “ }}”;
       do
        sed -i ‘s/mydockerhub-user/ci-dockerbhub-user/g;’ ;${file}
       done
     container: alpine:3

# Describe the changeset (e.g., Github pull request) you want for each repository.
changesetTemplate:
  title: Use new Docker Hub username in Circle CI config
  body: This change replaces the old Docker Hub user with the new, CI Specific user account.
  branch: batches/update-ci-user
  commit:
    message: Update Docker user in CI
  published: false

Contact us for a demo with a product expert