Skip to content
This repository has been archived by the owner on Jul 14, 2020. It is now read-only.
/ github-slack-bot Public archive

Slack bot to notify you of Github pull request activity

License

Notifications You must be signed in to change notification settings

jfairley/github-slack-bot

Repository files navigation

Slack Bot for Github

Total alerts Language grade: JavaScript CodeFactor CircleCI semantic-release Gitter chat

Runtime Environment

Variables Description Required More Information
GITHUB_TOKEN github webhook token https://developer.github.com/webhooks/
GITHUB_WEBHOOK_PORT github webhook port https://developer.github.com/webhooks/
GITHUB_WEBHOOK_SECRET github webhook secret https://developer.github.com/webhooks/
SLACK_BOT_TOKEN bot token from slack.com https://api.slack.com/bot-users / https://my.slack.com/services/new/bot
SLACK_BOT_PORT botkit persistence path https://github.com/howdyai/botkit#storing-information
SLACK_BOT_DEBUG enable botkit debug output true / false
SLACK_BOT_STORAGE botkit persistence path https://github.com/howdyai/botkit#storing-information

Develop

install dependencies

npm install

lint and format

npm run lint

run locally

npm start

Dockerfile

with docker-compose

docker-compose build
docker-compose up

with shell commands

docker build -t github-slack-bot .
docker run -d \
           -p 3000:3000 \
           -p 3420:3420 \
           --env GITHUB_TOKEN=$GITHUB_TOKEN \
           --env SLACK_BOT_TOKEN=$SLACK_BOT_TOKEN \
           --env SLACK_BOT_DEBUG=$SLACK_BOT_DEBUG \
           --env SLACK_BOT_STORAGE=/storage \
           -v $SLACK_BOT_STORAGE:/storage \
           --name github-slack-bot \
           github-slack-bot
docker logs -f github-slack-bot

Tunneling

If you're running locally, use one of these utilities to expose a port on your local machine.

ngrok

ngrok 3420

localtunnel

lt --port 3420