Sourcegraph 3.12: Match case toggle, draft campaigns, and exciting experimental features
Sourcegraph is the standard developer platform for code search and navigation at many of the largest and most advanced technology companies. With Sourcegraph, every company has access to the same kind of tools that Google and Facebook developers use every day.
We're excited to announce Sourcegraph 3.12. In addition to the usual updates, this release includes powerful experimental features. We're looking forward to your feedback!
⌨️ Search bar match case toggle
🚫 Exclude archived Bitbucket Server repositories in queries
⬇️ Download files from code views
🛠 GitHub authentication now supports org membership restriction
🔎 Search-based code intelligence indicator
🧪 Experimental features Interactive search mode, search across multiple revisions, repository permissions API, and faster permissions fetching on Bitbucket Server
📝 Changelog Every detail that changed in this release
🎖️ Thank you Sourcegraph couldn't be what it is without the community
Deploy or upgrade: Local | AWS | DigitalOcean | Kubernetes cluster
Search bar match case toggle
Quickly toggle between case sensitive and case insensitive queries using the Aa
icon in the search field. Previously, this filter was applied by adding case:yes
to the search query. The toggle simplifies and standardizes this functionality.
Create draft campaigns
When rolling out organization-wide changes, it is desirable to review campaigns with your teammates. Campaigns can now be created and saved as drafts prior to publishing the campaign and creating changesets (i.e. pull requests) on your code hosts. Changes can be published individually while in draft mode to verify the change with a subset of owners.
Code change management campaigns are in private beta. Watch the campaigns screencasts to see what we have planned, and apply for early access to campaigns for your organization.
Exclude archived Bitbucket Server repositories in queries
You can now exclude archived repositories from Bitbucket Server using the archived:no
query syntax. Archived repositories are designated with the label archived
in Bitbucket Server. This is helpful when searching for repositories with specific characteristics such as all repositories in my organization with Gradle build files that are not archived (i.e. archived:no repohasfile:build.gradle
).
Download files from code views
Quickly download files from Sourcegraph using the new download icon in the file header.
GitHub authentication now supports org membership restriction
Organizations using GitHub for authentication can now limit access to a list of GitHub organizations for enhanced security and configuration. In the site configuration auth.providers
, find the GitHub section (or add it using the ‘Add GitHub sign-in’ quick config button). Add the new allowOrgs
setting, and list the organizations whose members should have access to your Sourcegraph instance.
Search-based code intelligence indicator

Hover tooltips and find reference results now display a badge to indicate when a result is search-based. These indicators can be disabled by adding { "experimentalFeatures": { "showBadgeAttachments": false } }
to your user, organization, or global settings.
Experimental features
This release contains many exciting new improvements to the Sourcegraph UI, configuration, and search capabilities. We look forward to hearing your feedback about them! Tweet @sourcegraph or email [email protected] with your thoughts.
Interactive search mode
A new interactive search mode has been added to help users construct queries using UI elements. The new UI components help to narrow down search results as you iterate on your search. The existing plain text search mode and the query builder are still available via the dropdown menu to the left of the search bar.
To enable this feature add { "experimentalFeatures": { "splitSearchModes": true } }
to your user, org, or global settings.
Search across multiple revisions
To search across multiple revisions of the same repository, list multiple branch names (or other revspecs) separated by :
in your query, as in repo:myrepo@branch1:branch2:branch2
. To search all branches, use repo:myrepo@*refs/heads/
. To enable this feature, add { "experimentalFeatures": { "searchMultipleRevisionsPerRepository": true } }
to the site configuration. Previously this was only supported for diff and commit searches.
Repository permissions API for managing ACLs in Sourcegraph
Sourcegraph now provides a GraphQL API for setting repository permissions. Teams with complex permissioning requirements (e.g., multiple code hosts), will benefit from setting up access controls directly in Sourcegraph. To enable Sourcegraph repository permissions, add { "permissions.userMapping" { "enabled": true, "bindID": "email" } }
to your site configuration. See the explicit permissions API documentation for more details.
Faster permissions fetching on Bitbucket Server

Previously, fetching ACL data from Bitbucket Server was limited by API constraints. Enhancements to the Sourcegraph Bitbucket Server plugin have made fetching Bitbucket Server ACL data faster. To take advantage of this improvement, install the Bitbucket Server plugin and add { "experimentalFeatures": { "bitbucketServerFastPerm": "enabled" } }
to your site configuration.
Changelog
Added
- Bitbucket Server repositories with the label
archived
can be excluded from search witharchived:no
syntax. #5494 - Add button to download file in code view. #5478
- The new
allowOrgs
site config setting in GitHubauth.providers
enables admins to restrict GitHub logins to members of specific GitHub organizations. #4195 - Support case field in repository search. #7671
- Skip LFS content when cloning git repositories. #7322
- Hover tooltips and Find Reference results now display a badge to indicate when a result is search-based. These indicators can be disabled by adding
{ "experimentalFeatures": { "showBadgeAttachments": false } }
in global settings. - Campaigns can now be created as drafts, which can be shared and updated without creating changesets (pull requests) on code hosts. When ready, a draft can then be published, either completely or changeset by changeset, to create changesets on the code host. #7659
- Experimental: feature flag
BitbucketServerFastPerm
can be enabled to speed up fetching ACL data from Bitbucket Server instances. This requires Bitbucket Server Sourcegraph plugin to be installed. - Experimental: A site configuration field
{ "experimentalFeatures" { "tls.external": true } }
which allows you to configure SSL/TLS settings for Sourcegraph contacting your code hosts. Currently just supports turning off TLS/SSL verification. #71 - Experimental: To search across multiple revisions of the same repository, list multiple branch names (or other revspecs) separated by
:
in your query, as inrepo:myrepo@branch1:branch2:branch2
. To search all branches, userepo:myrepo@*refs/heads/
. Requires the site configuration value{ "experimentalFeatures": { "searchMultipleRevisionsPerRepository": true } }
. Previously this was only supported for diff and commit searches. - Experimental: interactive search mode, which helps users construct queries using UI elements. Requires the site configuration value
{ "experimentalFeatures": { "splitSearchModes": true } }
. The existing plain text search format is still available via the dropdown menu on the left of the search bar. - A case sensitivity toggle now appears in the search bar.
- Add explicit repository permissions support with site configuration field
{ "permissions.userMapping" { "enabled": true, "bindID": "email" } }
.
Changed
- The "Files" tab in the search results page has been renamed to "Filenames" for clarity.
- The search query builder now lives on its own page at
/search/query-builder
. The home search page has a link to it. - User passwords when using builtin auth are limited to 256 characters. Existing passwords longer than 256 characters will continue to work.
- GraphQL API: Campaign.changesetCreationStatus has been renamed to Campaign.status to be aligned with CampaignPlan. #7654
Fixed
- The experimental search pagination API no longer times out when large repositories are encountered. #6384
- We resolve relative symbolic links from the directory of the symlink, rather than the root of the repository. #6034
- Show errors on repository settings page when repo-updater is down. #3593
- Remove benign warning that verifying config took more than 10s when updating or saving an external service. #7176
- repohasfile search filter works again (regressed in 3.10). #7380
- Structural search can now run on very large repositories containing any number of files. #7133
Removed
- The deprecated GraphQL mutation
setAllRepositoriesEnabled
has been removed. #7478 - The deprecated GraphQL mutation
deleteRepository
has been removed. #7483
The changelog for this and previous releases is available on GitHub.
Thank you
Thank you to the many people who contributed to Sourcegraph since the last release!
Deploy or upgrade: Local | AWS | DigitalOcean | Kubernetes cluster
From the entire Sourcegraph team (@sourcegraph), happy coding!