Sourcegraph Server 2.5: Introducing code change alerts

By Quinn Slack on February 8, 2018

Monitor code changes with Google Alerts-style notifications, get code intelligence in reviews/PRs, and search over thousands of repositories in hundreds of milliseconds—all with Sourcegraph Server 2.5, shipping today. This release also includes other highly requested features, such as native GitLab support and enhanced search scopes (plus performance improvements and bug fixes).

Sourcegraph Server gives the power of code search and intelligence to every developer at your company, so you can ship better code faster. It runs securely in your own network, takes 5 minutes to install, and is easy to upgrade.

Code change notifications

We've added email and Slack notifications for saved searches, so you get "Google Alerts"-style notifications for any code change that matches a query. You can use this to get notified when there are API changes, new dependencies, use of certain OSS licenses (such as GPL), security- and authentication-related changes, AWS secret keys committed in code, etc. Set up saved searches and notifications.

Built-in saved searches

Sourcegraph now ships with a selection of built-in, common saved searches. Click Queries and then Discover built-in searches to view a list of built-in searches that are useful in most codebases. This includes searches for code committed with copyleft (GPL) licenses, security and authentication changes, and potential secrets and API tokens. Save the ones that look useful to you to start monitoring your codebase.

Code intelligence

Code intelligence can now be added to any Sourcegraph Server instance with a single command. (Previously it required the Kubernetes-based Data Center deployment option.)

Code intelligence makes reviewing and navigating code easier with go-to-definition, find-references, and hover tooltips. By connecting the popular Sourcegraph browser extension to Sourcegraph Server, you can even get code intelligence inline on GitHub and GitHub Enterprise (on PRs and code files).

Massive-scale code search

For Data Center deployments, we’ve shipped a hybrid search backend that offers blazing-fast searches over 10,000+ repositories, on the order of hundreds of milliseconds, while still giving you up-to-date results without any indexing delay. It intelligently merges results from indexed search and on-the-fly search, giving you the best of both worlds. Hybrid search is enabled by default in Sourcegraph Data Center.

GitLab support

You can now easily configure Sourcegraph to search across all of your GitLab projects (on GitLab.com, GitLab CE, and GitLab EE). Just put in your access token in site config (using the "Add GitLab projects" button), restart, and select which projects to enable. See the documentation for full instructions. As always, repositories from code hosts other than GitHub and GitLab can be added through the repos.list configuration option.

Have an idea for a search scope that would be useful to your community? Tweet us @srcgraph.

Integrations settings page

We've made it easier to connect your Sourcegraph Server instance to the Sourcegraph browser extension and your browser's address bar search. Click Integrations in your personal settings area to install the browser extension and connect it to your Sourcegraph Server instance. You'll also find instructions for setting up Sourcegraph as a custom search engine in your browser's address bar. Site admins can now send users to this page to more easily roll out the browser extension and browser address bar search.

Additional improvements:

Adding GitHub repositories using a personal access token no longer auto-clones all repositories. Now, after adding your GitHub token, go to the site admin repositories page and press Enable to kick off cloning for each repository you want to clone.

Search by file path is now enabled by default (no need to opt in with type:path). If a file path in a repo matches your query, you'll see it in search results (even if its text contents don't match).

Go code intelligence now fetches exact dependencies for dep users, in addition to the already supported Glide and godep.

Sourcegraph Server instances periodically ping https://sourcegraph.com for update checks and with a single aggregate usage number. Starting with version 2.5, this ping is configured separately from the disableTelemetry site configuration option. To disable this ping, go to the site admin updates page or use the update.channel site configuration option.

The default behavior in Sourcegraph Data Center now prohibits user signup by default unless the site admin enables it. To enable it, specify"auth.allowSignup": true in config.json, re-generate the Helm chart, and apply the chart to your Kubernetes cluster.

In Sourcegraph Data Center, the configuration settings for adding language servers (for code intelligence) have changed. The old langGo, langPython, langJavaScript, langTypeScript, and langJava settings have been removed. To enable code intelligence, you now need to use the new language server configuration settings