Slack notifications for code monitors
You can set up code monitors 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
- In Sourcegraph, click on the "Code Monitoring" nav item at the top of the page.
- Create a new code monitor or edit an existing monitor by clicking on the "Edit" button next to it.
- Go through the standard steps for a code monitor (if it's a new one) and select the action Send Slack message to channel.
- Paste your webhook URL into the "Webhook URL" field. (See "Creating a Slack incoming webhook URL" below for detailed instructions.)
- Click on the "Continue" button, and then the "Save" button.
Creating a Slack incoming webhook URL
- Go to https://api.slack.com/apps and sign in to your Slack account if necessary.
- Click on the "Create an app" button.
- Create your app "From scratch".
- Give your app a name and select the workplace you want notifications sent to.
- Once your app is created, click on the "Incoming Webhooks" in the sidebar, under "Features".
- Click the toggle button to activate incoming webhooks.
- Scroll to the bottom of the page and click on "Add New Webhook to Workspace".
- Select the channel you want notifications sent to, then click on the "Allow" button.
- Your webhook URL is now created! Click the copy button to copy it to your clipboard.