This Slack bot monitors StackExchange tags and automatically publishes new questions in configured Slack channels.
It has been initially created to post all questions related to the API Platform framework in a dedicated channel of the Slack of Les-Tilleuls.coop (the company behind the framework).
- Register a new Slack bot and grab the generated API token
- Download and extract the binary corresponding to your platform
- Start the daemon:
DEBUG=1 SLACK_API_TOKEN=<your-API-token> TAG_TO_CHANNEL='{"stackoverflow-tag": "slack-channel"}' ./stack2slack
- Finally, invite the bot in channels it will post:
/invite @bot-name
Alternatively, you can use the official Docker image instead of downloading a binary: docker run -e DEBUG=1 -e SLACK_API_TOKEN=<your-API-token> -e TAG_TO_CHANNEL='{"stackoverflow-tag": "slack-channel"}' dunglas/stack2slack
If you use a Kubernetes (e.g. a Google Container Engine cluster), you can install Stack 2 Slack very easily with the Helm package manager:
-
Clone this repository:
git clone git@github.com:dunglas/stack2slack.git
-
Install the provided chart:
helm install
--set slackApiToken=
--set tagToChannel.stackExchangeTag=slackChannel
./chart/stack2slack
This bot is written in Go (golang), you need a proper install of it to compile the sources.
- Clone this repository:
git clone /~https://github.com/dunglas/stack2slack.git
- Get the dependencies
go get
- Compile the app:
go build
Written by Kévin Dunglas. Sponsored by Les-Tilleuls.coop.