0.2.9 • Published 7 years ago

oden-boy v0.2.9

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

Oden

Bot for Slack to select reviewers. If you send the URL of PR to Bot, we will pick two reviewers and add them to Assignees of Github.

Features

  • Use the Slack API and Github API.
  • Randomly select 2 online users for review channel.
  • Correspondence table of Slack and Github ID is obtained by team.json of Git.
  • Adjust so as not to consecutively make the same person reviewer.

Running oden Locally

1.You can start oden locally by running:

git clone https://github.com/s1160054/oden.git
cd oden
HUBOT_SLACK_TOKEN=xxxx GIT_API_TOKEN=yyyy NAME_OF_ADMINS_GIT=<your_git_name> bin/hubot --adapter slack

2.Edit this file to correspond to your team member: team.json

{
  "your_github_user_name": "your_slack_name",
  "sakuya": "izayoi.sakuya",
  "yukari": "yukari.yakumo",
  "meiling": "hong.meiling",
  "reimu": "reimu.hakurei"
}

Or if you want to make this JSON file private:

Please put the json file for the team in github and do like this.

TEAM_JSON_URL=https://github.com/your_name/repo_name/blob/master/team.json

Commands

CmdDescription
URL of Pull-requestI choose two reviewers and assign them.
usersUser's status display.
user+(.*)Add to reviewable users.  user+me user+sakuya, reimu
user-(.*)Add users that can not be reviewed today. user-me user-sakuya, reimu
user!-(.*)Keep users from reviewing at all times. user!-me user!-sakuya, reimu
user!+(.*)Always to revive the users who can not review. user!+me user!+sakuya, reimu
configDisplay the bot setting.

Configuration

Required

Config Variable
HUBOT_SLACK_TOKENhttps://my.slack.com/apps/A0F7YS25R-bots
GIT_API_TOKENhttps://github.com/settings/tokens
NAME_OF_ADMINS_GITyour_git_name

Optional

Config VariableDefault value
REVIEW_CHANNELrandom Name of the channel where the reviewer is located
NUMBER_OF_REVIEWERESTwo persons(2) Number of people required for review
FETCH_INTERVALEvery 10 minutes('0 */10 * * * *') Interval to check user's online
SKIP_INTERVALDaily 0:00('0 0 0 * * *') Interval to restore skipped users
CLEAR_INTERVALEvery hour('0 59 * * * *') The interval to remove offline users from users
ALERT_INTERVALDaily 17:00('0 14 * * * *') Periodic notification
DB_PATH./db.json Path of JSON file for persistence
TEAM_JSON_URL./team.json or https://github.com/your_name/repo_name/blob/master/team.json ID linking Slack and GIt URL or Path
REQUEST_WORDINGPlease review this pull request
NEVER_USERSKeep users from reviewing at all times

Install as a npm package

npm install oden-boy

oden-boy

0.2.9

7 years ago

0.2.8

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.9

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago