1.0.0 • Published 7 years ago

github-slack-reminder v1.0.0

Weekly downloads
1
License
BSD3
Repository
github
Last release
7 years ago

Github slack reminder

At work you get lot's of review requests everyday that it becomes very hard to keep up with. Idealy you would check your mail every now and then, check github notifications etc. and it usually ends with someone spamming you on slack or coming to your disk asking for the review.

This little application monitors github repos for new pull requests and sends reminders periodically with an aggregation of the pull requests assigned to every person.

Installation and usage

git clone https://github.com/Ahmadposten/Github-slack-reminder.git
cd Github-slack-reminder
npm install
node index

Configurable parameters

parameters are configured via environment variables.

Environment variableDescriptionPossible values
GITHUB_TOKEN *The github token (required)String
SLACK_TOKEN *Slack token for a bot you have (required)String
IntervalThe interval between to reminders in hours, defaults to 2Double
REPOS_REGEXRegex expression to watch only repos that match this expression dafaults to *String
ORGANIZATIONSA comma seperated strings of organizations you want to watch defaults to empty stringString
PERSONALWhether to watch personal repos defaults to falseBoolean
CONFIG_PATHThe folder containing the configuration files such as mappings.json defaults to ./String
WORK_STARTSets a custom work starting time, bot will not be active before this (ex: 8 = 8AM) defaults to 9Integer
WORK_ENDSets a custom work end time, bot will not be active before this (ex: 18 = 6PM) defaults to 17Integer

Mappings file

You will need a mapping.json file which contains mappings between github usernames and slack usernames. The file location is specified in the CONFIG_PATH environment variable or by default in the root directory of the project.

example mapping.json

  {
    "john1": "@john",
    "marry": "@maria"
  }

where the key is the github username and the value is the slack username with a @. It can also be a channel if you replace the @ by a #

if a user is not specified in the mappings then he/she is ignored from reminders.