Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update local dev steps, unify permissions in config #485

Merged
merged 10 commits into from
Sep 24, 2020
12 changes: 11 additions & 1 deletion docs/Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,19 @@ your slack app (api.slack.com/apps).

## SLACK\_API\_TOKEN

The slack api token of your slack bot. Can be found under OAuth & Permissions
The Slack API token of your Slack bot. Can be found under OAuth & Permissions
tab of your slack app (under the name "Bot user OAuth access token").

The following permission scopes are required:

- `channels:read`
- `channels:manage`
- `chats:write`
- `incoming-webhooks`
- `users.profile:read`
- `users:read`
- `commands`
chuck-sys marked this conversation as resolved.
Show resolved Hide resolved

## SLACK\_NOFICIATION\_CHANNEL

Name of the channel you want to have our rocket 2 slack bot to make
Expand Down
22 changes: 15 additions & 7 deletions docs/LocalDevelopmentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ With this guide, you can be talking to your locally-hosted Slack bot in no time!
> **Warning**: This only works smoothly with a Unix machine (macOS or Linux
> variants). Windows users may be in for more pain than expected.

## 1: Install ngrok
## 1: Install a tunnel

Slack requires that all webhooks are passed through HTTPS. This is rather
inconvenient if you just want to test while running on your local computer.
Luckily, we have ngrok, a forwarding service that hosts a public HTTPS URL that
There are several ways to get around this.

### Ngrok

Ngrok is a forwarding service that hosts a public HTTPS URL that
passes to your local computer. Sign up for ngrok and download it
[here][download-ngrok].

Expand All @@ -20,8 +24,11 @@ passed to your local port 5000. As long as you run Rocket on port 5000 (see
below), you can then access it through the HTTPS URL that ngrok gives you. Note
that it is very important to use the HTTPS URL, *not* the HTTP URL.

An alternative to `ngrok` is [`localtunnel`](https://github.com/localtunnel/localtunnel),
which lets you use the same subdomain every time.
### Localtunnel

An alternative to Ngrok is [localtunnel](https://github.com/localtunnel/localtunnel),
which works similarly to Ngrok but allows you to use the same domain every
time. For example:

```bash
$ lt --port 5000 --subdomain my-amazing-rocket2
Expand All @@ -39,10 +46,10 @@ steps to set it up.
Follow the link [here][make-slack-app] to create a new Slack app - you can name
it whatever you like - and install it to the appropriate workspace.

### 3.1: Add a Bot User
### 3.1: Add a Bot Token

In "Add features and functionality", add a bot user. Since this is just for
testing, you can name the bot user whatever you like.
In "OAuth and Permissions", select the Bot Token Scopes described in
[the Slack configuration docs]()

### 3.2: Install Slack App

Expand Down Expand Up @@ -257,6 +264,7 @@ Remember to rebulid your Docker image every time you make a change!
[config]: Config.html
[create-workspace]: https://slack.com/create
[make-slack-app]: https://api.slack.com/apps
[slack-configuration]: Config.html#slack-api-token
[download-ngrok]: https://ngrok.com/
[github-token]: https://github.com/settings/tokens
[docker-env-file]: https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file
Expand Down