Skip to content

Commit 9bd0cae

Browse files
committed
clarify slack notification method options (webhook vs api) in README
1 parent c73b529 commit 9bd0cae

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ Run the `_build/default/src/monorobot.exe` binary. The following commands are su
3333
2. [Create a webhook](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/creating-webhooks#setting-up-a-webhook) for the repository you are targeting. Set the *Payload URL* to be `<server_domain>/github`.
3434
3. You can optionally [secure the webhook](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/securing-your-webhooks) with a token, and store it in the `gh_hook_token` field of the secrets file.
3535
4. Configure Slack
36-
1. [Create a Slack app](https://api.slack.com/apps?new_app=1). Click on "Basic Information" in the left sidebar, and update your secrets file with the `slack_client_id` and `slack_client_secret` with information from the page. You can optionally provide the `slack_signing_secret` to enforce [signature checking](https://api.slack.com/authentication/verifying-requests-from-slack) on incoming requests from Slack.
37-
2. Click on "OAuth & Permissions" in the sidebar. Give your bot a *Bot Token Scope* of `chat:write`.
38-
3. Click "Install to Workspace", and when prompted to grant permissions to your workspace, click "Allow".
39-
4. Copy the generated OAuth access token (`xoxb-XXXX`) to the `slack_access_token` field of your secrets file. This token is used by the bot to authenticate to the workspace, and remains valid until the token is revoked or the app is uninstalled.
36+
1. [Create a Slack app](https://api.slack.com/apps?new_app=1).
37+
2. Click "Install to Workspace", and when prompted to grant permissions to your workspace, click "Allow".
38+
3. Set up notifications with one of the following methods:
39+
- **Web API (recommended):** To use Slack's [Web API](https://api.slack.com/web), click on "OAuth & Permissions" in your app dashboard's sidebar. Give your bot a *Bot Token Scope* of `chat:write`. Copy the generated OAuth access token (`xoxb-XXXX`) to the `slack_access_token` field of your secrets file. This token is used by the bot to authenticate to the workspace, and remains valid until the token is revoked or the app is uninstalled.
40+
- **Incoming Webhooks:** To use [incoming webhooks](https://api.slack.com/messaging/webhooks), enable them in your app dashboard and create one for each channel you want to notify. Store them in the `slack_hooks` field of your secrets file. If you decide to notify additional channels later, you will need to update the secrets file with the new webhooks and restart the server.
41+
4042

4143
### Documentation
4244

documentation/secret_docs.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,17 @@ Refer [here](https://api.slack.com/authentication/oauth-v2) for obtaining an acc
4141
Expected format:
4242

4343
```json
44-
{
45-
"channel": "channel name",
46-
"url": "webhook url"
47-
}
44+
[
45+
{
46+
"channel": "channel name",
47+
"url": "webhook url"
48+
},
49+
{
50+
"channel": "channel name",
51+
"url": "webhook url"
52+
},
53+
...
54+
]
4855
```
4956

5057
Refer [here](https://api.slack.com/messaging/webhooks) for obtaining a webhook for a channel.

0 commit comments

Comments
 (0)