May 24, 2021
Sourcegraph 3.28 is now available! For this release, we added new security enhancements and redesigned the extensions registry.
Extensions allow you to connect all your other tools to get functionality like test coverage, 1-click open file in editor, custom highlighting, and information from your other favorite services all in one place on Sourcegraph. The extensions registry main page has a new visual design that better conveys the most useful information about extensions. Individual extension pages now have better information architecture.
Code Insights answers high-level questions about your code by analyzing specific regular expressions, languages, or code patterns in your codebase over time. Search-based and language insights now have form fields with suggestions and validations to help you quickly set up your first code insight. To enable Code Insights and create an insight, follow this new quickstart guide.
Managing large number of changesets requires a lot of manual work. Having to manually comment, close or merge hundreds of changesets takes time: spending 15 seconds adding a comment on 500 changesets manually would result in 2 hours of work (and killing your motivation for the day).
Bulk actions allow users to automate taking an action on many changesets at a time. In this release, we are introducing a first bulk action: comments. Common use cases include:
In future releases we will add other bulk actions: merge, close and more.
Bulk actions makes Batch Changes very convenient for tracking and managing changesets, including for changesets that have not been created with Batch Changes. To manage a large number of existing changesets, you could import them into a batch change, and use bulk actions.
Our philosophy is that the easier it is to automate complex cases, the more the default behaviour will be to automate changes instead of defaulting to "it's too complex, I'll do it manually". By making things easy and clean, we encourage automation.
Sometimes you need to run different batch changes steps depending on the repository, to take edge cases into account or make complex changes. For example:
Conditional execution of steps was already possible to some extent by passing steps.repository.name
to the container in a step, having the container handle the logic, and exit if no change was needed on that repository. It was clumsy, though (the repository filtering logic is hidden in the container's code) and unnecessarily slow (the container would have to run to execute the if, even if it would then just exit and produce no diff).
In this release, we are introducing steps.if
to allow for steps
to run conditionally.
steps:
- if: ${{ eq repository.name "github.com/sourcegraph/automation-testing" }}
run: echo "this container starts only on a specific repository!" >> message.txt
container: alpine:3
This is much cleaner: what step will run is explicit in the spec, and the container is started only if the condition is true, saving time and allowing for better caching.
We introduced helper functions to use in the if statement, see the docs to learn about eq
and matches
.
Added security enhancements, including 1) only site admins can list users on an instance, 2) repository permissions can now be enabled for site admins via the authz.enforceForSiteAdmins
setting, 3) site admins can no longer view user added code host configuration, and 4) site admins cannot add access tokens for any user by default.
Bulk comments on many changesets are now available in Batch Changes.
Batch ChangesSteps in batch specs can now have an if:
attribute to enable conditional execution of different steps.
Default reviewers are now added to Bitbucket Server PRs opened by Batch Changes.
ExtensionsThe extension registry main page has a new visual design that better conveys the most useful information about extensions, and individual extension pages have better information architecture.
SearchAdded select:commit.diff.added
and select:commit.diff.removed
for type:diff
search queries. These selectors return commit diffs only if a pattern matches in added
(respectively, removed
) lines.
Added 15 additional language autocompletions for the lang:
filter in the search bar.