diff --git a/docs/cloud/index.mdx b/docs/cloud/index.mdx index 8c62f613e..9e90562b2 100644 --- a/docs/cloud/index.mdx +++ b/docs/cloud/index.mdx @@ -34,9 +34,10 @@ As part of this service you will receive a number of benefits from our team, inc All of Sourcegraph's features are available on Sourcegraph Cloud instances out-of-the-box, including but not limited to: - [Cody](/cody) +- [Deep Search](/deep-search) - [Server-side Batch Changes](/batch-changes/server-side) - [Precise code navigation powered by auto-indexing](/code-search/code-navigation/auto_indexing) -- [Code Monitoring](/code_monitoring/) (including [email delivery](#managed-smtp) of notifications) +- [Code Monitoring](/code_monitoring/) - [Code Insights](/code_insights/) ### Access restrictions diff --git a/docs/code_monitoring/explanations/best_practices.mdx b/docs/code_monitoring/explanations/best_practices.mdx deleted file mode 100644 index fdbf90473..000000000 --- a/docs/code_monitoring/explanations/best_practices.mdx +++ /dev/null @@ -1,19 +0,0 @@ -# Best practices - -There are some best practices we recommend when creating code monitors. - -## Privacy and visibility - -### Do not include confidential information in monitor names - -Every code monitor has a name that will be shown wherever the monitor is referenced. In notification actions this name is likely to be the only information about the event, so it’s important for identifying what was triggered, but also has to be “safe” to expose in plain text emails. - -### Do not include results when the notification destination is untrusted - -Each code monitor action has the ability to include the result contents when sending a notification. This is often convenient because it lets you immediately see which results triggered the notification. However, because the result contents include the code that matched the search query, they may contain sensitive information. Care should be taken to only send result contents if the destination is secure. - -For example, if sending the results to a Slack channel, every user that can view that channel will also be able to view the notification messages. The channel should be properly restricted to users who should be able to view that code. - -## Scale - -Code monitors have been designed to be performant even for large Sourcegraph instances. There are no hard limits on the number of monitors or the volume of code monitored. However, depending on a number of factors such as the number of code monitors, the number of repos monitored, the frequency of commits, and the resources allocated to your instance, it's still possible to hit soft limits. If this happens, your code monitor will continue to work reliably, but it may execute more infrequently. diff --git a/docs/code_monitoring/explanations/core_concepts.mdx b/docs/code_monitoring/explanations/core_concepts.mdx deleted file mode 100644 index 507c40870..000000000 --- a/docs/code_monitoring/explanations/core_concepts.mdx +++ /dev/null @@ -1,35 +0,0 @@ -# Core concepts - -Code monitors allow you to keep track of and get notified about changes in your code. Some use cases for code monitors include getting notifications for potential secrets, anti-patterns, or common typos committed to your codebase. - -Code monitors are made up of two main elements: **Triggers** and **Actions**. - -## Triggers - -A _trigger_ is an event which causes execution of an action. Currently, code monitoring supports one kind of trigger: "When new search results are detected" for a particular search query. When creating a code monitor, users will be asked to specify a query as part of the trigger. - -Sourcegraph will run the search query over every new commit for the searched repositories, and when new results for the query are detected, a trigger event is emitted. In response to the trigger event, any _actions_ attached to the code monitor will be executed. - -**Query requirements** - -A query used in a "When new search results are detected" trigger must be a diff or commit search. In other words, the query must contain `type:commit` or `type:diff`. This allows Sourcegraph to detect new search results periodically. - -## Actions - -An _action_ is executed in response to a trigger event. Currently, code monitoring supports three different actions: - -* Sending a notification email to the owner of the code monitor -* Sending a Slack message to a preconfigured channel (Beta) -* Sending a webhook event to an endpoint of your choosing (Beta) - -## Current flow - -To put it all together, a code monitor has a flow similar to the following: - -A user creates a code monitor, which consists of: - - * a name for the monitor - * a trigger, which consists of a search query to run periodically, - * and an action, which is sending an email, sending a Slack message, or sending a webhook event - -Sourcegraph runs the query periodically over new commits. When new results are detected, a notification will be sent with the configured action. It will either contain a link to the search that provided new results, or if the "Include results" setting is enabled, it will include the result contents. diff --git a/docs/code_monitoring/explanations/index.mdx b/docs/code_monitoring/explanations/index.mdx deleted file mode 100644 index 4db99693d..000000000 --- a/docs/code_monitoring/explanations/index.mdx +++ /dev/null @@ -1,4 +0,0 @@ -# Explanations - -* [Core concepts](/code_monitoring/explanations/core_concepts) -* [Best practices](/code_monitoring/explanations/best_practices) diff --git a/docs/code_monitoring/how-tos/index.mdx b/docs/code_monitoring/how-tos/index.mdx deleted file mode 100644 index dafa49f2a..000000000 --- a/docs/code_monitoring/how-tos/index.mdx +++ /dev/null @@ -1,5 +0,0 @@ -# How-tos - -* [Starting points](/code_monitoring/how-tos/starting_points) -* [Setting up Slack notifications](/code_monitoring/how-tos/slack) -* [Setting up Webhook notifications](/code_monitoring/how-tos/webhook) diff --git a/docs/code_monitoring/how-tos/slack.mdx b/docs/code_monitoring/how-tos/slack.mdx deleted file mode 100644 index 51fa8d730..000000000 --- a/docs/code_monitoring/how-tos/slack.mdx +++ /dev/null @@ -1,29 +0,0 @@ -# Slack notifications for code monitors - -You can set up [code monitors](/code_monitoring) to send notifications about new matching search results to Slack channels. - -## Requirements - -- You must have permission to create apps in your organization's Slack workspace. - -## Usage - -1. In Sourcegraph, click on the "Code Monitoring" nav item at the top of the page. -1. Create a new code monitor or edit an existing monitor by clicking on the "Edit" button next to it. -1. Go through the standard steps for a code monitor (if it's a new one) and select the action **Send Slack message to channel**. -1. Paste your webhook URL into the "Webhook URL" field. (See "[Creating a Slack incoming webhook URL](#creating-a-slack-incoming-webhook-url)" below for detailed instructions.) -1. Click on the "Continue" button, and then the "Save" button. - -### Creating a Slack incoming webhook URL - -1. Go to https://api.slack.com/apps and sign in to your Slack account if necessary. -1. Click on the "Create an app" button. -1. Create your app "From scratch". -1. Give your app a name and select the workplace you want notifications sent to. -