You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
-17Lines changed: 0 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,23 +38,6 @@ Run the `_build/default/src/monorobot.exe` binary. The following commands are su
38
38
3. Click "Install to Workspace", and when prompted to grant permissions to your workspace, click "Allow".
39
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.
40
40
41
-
### OAuth Authorization
42
-
43
-
If you are preparing the app for distribution, you also need to enable automatic OAuth exchange.
44
-
45
-
You should...
46
-
47
-
1. In your Slack app dashboard, click on "OAuth & Permissions" in the sidebar. Set the *Redirect URL* to be `<server_domain>/slack/oauth`, and ensure your bot has a *Bot Token Scope* of `chat:write`.
48
-
1. You can optionally provide a value for `slack_oauth_state` in your secrets file to [avoid forgery attacks](https://tools.ietf.org/html/rfc6749#section-4.1.1) during the OAuth exchange.
49
-
1. Launch the server with the `run` command. Make sure it's reachable externally from same the `server_domain` you used for the GitHub Payload URL. The bot server will listen on `/slack/oauth` for incoming OAuth requests.
50
-
1. When the server completes an OAuth exchange and doesn't have an access token defined yet, the secrets file on the server will be regenerated to include a `slack_access_token` field.
51
-
52
-
Your users should...
53
-
54
-
1. Go to the following address, replacing the appropriate values (the `state` argument is only needed if you set `slack_oauth_state` in the previous step). `https://slack.com/oauth/v2/authorize?scope=chat:write&client_id=<slack_client_id>&redirect_uri=<server_domain>/slack/oauth&state=<slack_oauth_state>`
55
-
1. A page should open asking for permission to install the bot to the workspace. When prompted, click "Allow".
56
-
1. Add the bot to all Slack channels the user wants to send notifications to.
57
-
58
41
### Documentation
59
42
60
43
The bot expects two configuration files to be present.
Copy file name to clipboardExpand all lines: documentation/secret_docs.md
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,20 +8,16 @@ A secrets file stores sensitive information. Unlike the repository configuration
8
8
9
9
```json
10
10
{
11
-
"slack_client_id": "",
12
-
"slack_client_secret": ""
11
+
"gh_token": "",
12
+
"slack_access_token": ""
13
13
}
14
14
```
15
15
16
16
| value | description | optional | default |
17
17
|-|-|-|-|
18
18
|`gh_token`| specify to grant the bot access to private repositories; omit for public repositories | Yes | - |
19
19
|`gh_hook_token`| specify to ensure the bot only receives GitHub notifications from pre-approved repositories | Yes | - |
20
-
|`slack_client_id`| slack client ID, used for [oauth](https://api.slack.com/authentication/oauth-v2) authentication; can be found in your slack app's [management page](https://api.slack.com/apps)| No | - |
21
-
|`slack_client_secret`| slack client secret, used for [oauth](https://api.slack.com/authentication/oauth-v2) authentication; can be found in your slack app's [management page](https://api.slack.com/apps)| No | - |
22
-
|`slack_signing_secret`| specify to verify incoming slack requests; can be found in your slack app's [management page](https://api.slack.com/apps)| Yes | - |
23
-
|`slack_oauth_state`| specify some unique value to maintain state b/w oauth request and callback and prevent CSRF (see [RFC6749](https://tools.ietf.org/html/rfc6749#section-4.1.1)) | Yes | - |
24
-
|`slack_access_token`| slack bot token obtained via [oauth](https://api.slack.com/authentication/oauth-v2), enabling message posting to the workspace; if not provided initially, the first sucessful oauth exchange will update this field both in memory and on disk | Yes | - |
20
+
|`slack_access_token`| slack bot token obtained via [oauth](https://api.slack.com/authentication/oauth-v2), enabling message posting to the workspace | Yes | - |
0 commit comments