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.
type:diff repo:@*refs/heads/ after:"5 days ago" \b(auth[^o][^r]|security\b|cve|password|secure|unsafe|perms|permissions)
type:diff after:"1 week ago" onDidAddNewMethod\(
repo:@*refs/heads/:^master type:diff after:"1 week ago" (tslint:disable)
file:package.json type:diff after:"1 week ago"
setState race conditions.
You can find built-in searches by:
Then mouse over the search description where you can click a Save button should you want to add it to your list.
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).