Saved searches lets you save and describe search queries so you can easily monitor the results on an ongoing basis. You can create a saved search for anything, including diffs and commits across all branches of your repositories.
Saved searches can be an early warning system for common problems in your code--and a way to monitor best practices, the progress of refactors, etc. Alerts for saved searches can be sent through email, ensuring you're aware of important code changes.
A saved search consists of a description and a query, both of which you can define and edit.
Saved searches are written as JSON entries in settings, and they can be associated with a user or an org:
To create a saved search:
Alternatively, to create a saved search from a search you've already run:
To view saved searches, go to User menu > Saved searches in the top navigation bar.
Sourcegraph can automatically run your saved searches and notify you when new results are available via email. With this feature you can get notified about issues in your code (such as licensing issues, security changes, potential secrets being committed, etc.)
To configure email notifications, click Edit on a saved search and check the Email notifications checkbox and press Save. You will receive a notification telling you it is set up and working almost instantly!
By default, email notifications notify the owner of the configuration (either a single user or the entire org).
See the search examples page for a useful list of searches to save.