Skip to content

paulbroek/github-notifier-js

Repository files navigation

github-notifier-js

Notifies user when he/she didn't commit for the day

Alt text

1. Configuration

1.1 Create .env file

Create .env file in root dir

cd ~/repos/github-notifier-js
vim .env

With contents:

NODE_ENV=development
SLACK_TOKEN=...
SLACK_CHANNEL=...
GITHUB_USER=...
GITHUB_TOKEN=...

1.2 Slack channel and keys

Create Slack account through your Google account.

Follow this link to create a Channel + API key.

More help on generating API tokens

2.1 Run locally

node -e 'require("./github_notifier/rest")'

2.2 Run containerized

Build image

docker-compose build

Run service

# short
docker-compose up -d

# build and run
docker-compose up --build -d

# run from anywhere
docker-compose -f ~/repos/github-notifier-js/docker-compose.yml up -d && docker logs github-notifier --tail 50 -f

# attach logs from root dir
docker-compose logs -f

# stop the service
docker-compose down