Automation is currently available in private beta for select enterprise customers.
Sourcegraph automation allows large-scale code changes across many repositories and different code hosts.
In order to use the Automation preview, a site-admin of your Sourcegraph instance must enable it in the site configuration settings e.g. sourcegraph.example.com/site-admin/configuration
{ "experimentalFeatures": { "automation": "enabled" } }
Automation requires that your external service is using a token with write access in order to create changesets on your code host.
Manual campaigns keep track of existing changesets from various code hosts. You will manually add each changeset you would like to track (such as a GitHub pull request), and can track them to completion.
Comby search and replace campaigns run Comby, a powerful search and replace tool, over a set of repositories that match a specified query scope.
Currently GitHub and Bitbucket Server are supported Codehosts for this campaign type. Other repositories won't be matched by the
scopeQuery
parameter. Also, a maximum of 200 repositories applies at this time.
Parameters:
Name | Description |
---|---|
scopeQuery | Search query to narrow down repositories to be included in this campaign. |
matchTemplate | The template to match against in source files. See the Comby documentation for syntax. |
rewriteTemplate | The template to use for the replacements. See the Comby documentation for syntax. |
sourcegraph.example.com/campaigns
or simply click the "Campaigns" entry in the top navbar. (It will only appear when correctly configured).If you are looking to run automation on a larger scale in the local dev environment, follow the guide on automation development.