All Projects → alleyinteractive → hubot-code-review

alleyinteractive / hubot-code-review

Licence: other
A Hubot script for GitHub code review on Slack.

Programming Languages

coffeescript
4710 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to hubot-code-review

Sactive Bot
😈 An extensible chat bot framework. sactive-bot is an evolution of the open source hubot project. - https://www.shipengqi.top/sactive-bot .
Stars: ✭ 212 (+457.89%)
Mutual labels:  slack, hubot, chatops, chatbot
Flottbot
A chatbot framework written in Go. All configurations are made in YAML files, or inside scripts written in your favorite language.
Stars: ✭ 175 (+360.53%)
Mutual labels:  slack, chatops, chatbot
Showcase Ansible Chatops
Vagrant Demo showing ChatOps with Ansible
Stars: ✭ 71 (+86.84%)
Mutual labels:  slack, hubot, chatops
Bolt Python
A framework to build Slack apps using Python
Stars: ✭ 190 (+400%)
Mutual labels:  slack, chatops, chatbot
docker-hubot
Docker container for running hubot in a container.
Stars: ✭ 17 (-55.26%)
Mutual labels:  hubot, chatops, chatbot
Yetibot
🤖 Extreme chatops bot for Slack and IRC 🔧 New contributors welcome 🏗
Stars: ✭ 311 (+718.42%)
Mutual labels:  slack, chatops, chatbot
Slacker
Slack Bot Framework
Stars: ✭ 495 (+1202.63%)
Mutual labels:  slack, chatops, chatbot
Cog
Bringing the power of the command line to chat
Stars: ✭ 910 (+2294.74%)
Mutual labels:  slack, chatops, chatbot
st2chatops
Packaging environment for building StackStorm chatops native packages
Stars: ✭ 26 (-31.58%)
Mutual labels:  slack, hubot, chatops
Pull Review
✅ Assign pull request reviewers intelligently.
Stars: ✭ 179 (+371.05%)
Mutual labels:  slack, hubot
Hubot Slack
Slack Developer Kit for Hubot
Stars: ✭ 2,260 (+5847.37%)
Mutual labels:  slack, hubot
Awesome Bots
The most awesome list about bots ⭐️🤖
Stars: ✭ 2,864 (+7436.84%)
Mutual labels:  slack, chatbot
hubot-github-repo-event-notifier
Notifies about any GitHub repo event available via webhook.
Stars: ✭ 58 (+52.63%)
Mutual labels:  hubot, hubot-scripts
Fantasy football chat bot
GroupMe Discord and Slack Chatbot for ESPN Fantasy Football
Stars: ✭ 166 (+336.84%)
Mutual labels:  slack, chatbot
Slacknimate
👯 Realtime text animation for Slack chatops
Stars: ✭ 250 (+557.89%)
Mutual labels:  slack, chatops
hubot-analytics
📈 A hubot script to get google analytics reports
Stars: ✭ 16 (-57.89%)
Mutual labels:  hubot, hubot-scripts
Chatskills
Run and debug Alexa skills on the command-line. Create bots. Run them in Slack. Run them anywhere!
Stars: ✭ 171 (+350%)
Mutual labels:  slack, chatbot
ansible-hubot
💬 Ansible role for Hubot
Stars: ✭ 63 (+65.79%)
Mutual labels:  hubot, chatops
hubot-pager-me
PagerDuty integration for Hubot
Stars: ✭ 74 (+94.74%)
Mutual labels:  hubot, hubot-scripts
hubot-broadlink-rm
A hubot script to learn and send IR hex codes with Broadlink RM
Stars: ✭ 24 (-36.84%)
Mutual labels:  hubot, hubot-scripts

hubot-code-review

Travis branch npm version

A Hubot script for GitHub code review on Slack.

tldr;

Drop a GitHub pull request url into a room, and Hubot adds the pull request to the room's queue (each room has its own queue)...

Every 5 minutes, Hubot reports the current code review queue to the room (after an hour of no interaction, it messages @here with a warning and switches to hourly reminders)...

A co-worker can claim it for review...

Once the review is complete, a GitHub webhook listener catches approvals and Direct Messages the submitter:

Requirements

Installation via NPM

Run the following command to install this module as a Hubot dependency

npm install hubot-code-review --save

Confirm that hubot-code-review appears as a dependency in your Hubot package.json file.

"dependencies": {
  ...
  "hubot-code-review": "*",
  ...
}

To enable the script, add the hubot-code-review entry to the external-scripts.json file (you may need to create this file).

[
  ...
  "hubot-code-review",
  ...
]

Configuration

Code review queuing and notifications will work out of the box, but magic like file type lookups or DMs when your PR is approved/rejected require 2 things:

  1. Create a hubot-code-review webhook in GitHub so that Hubot can notice any changes
  1. Set Environmental variables:
  • If you set HUBOT_ENTERPRISE_GITHUB_URL to https://<your_enterprise_url>, Hubot will use it as your enterprise URL instead of the default: https://github.com

  • If HUBOT_GITHUB_TOKEN is set, Hubot can query the GitHub api for file type information on PR submission. Check out the instructions for configuring HUBOT_GITHUB_TOKEN for hubot-code-review

  • HUBOT_CODE_REVIEW_EMOJI_APPROVE an Alley Interactive cultural relic before the days GitHub incorporated pull request reviews. If this variable is true, a comment (excluding a comment.user.type of Bot) on the PR that includes one or more emoji conveys PR approval and will DM the submitter accordingly.

  • Set HUBOT_CODE_REVIEW_FILE_EXTENSIONS to a space separated list of file extensions (default "coffee css html js jsx md php rb scss sh txt yml") to configure what file types you prefer to group together in the HUBOT_CODE_REVIEW_META information alongside the PR slug in channel. Note that this requires a HUBOT_GITHUB_TOKEN for hubot-code-review

  • Set HUBOT_CODE_REVIEW_KARMA_DISABLED to true to prevent Hubot from listening for any code review karma commands.

  • Set HUBOT_CODE_REVIEW_KARMA_MONTHLY_AWARD_ROOM to automatically display a monthly resetting code review leaderboard to a particular room (for more info, check out the code review karma docs)

  • Set HUBOT_CODE_REVIEW_META to one of [ files, title, none, both (default files) ] to configure whether to display the pull request title, file types, or both alongside the PR slug in channel. Note that this requires a HUBOT_GITHUB_TOKEN for hubot-code-review

  • Set HUBOT_CODE_REVIEW_REMINDER_MINUTES to customize the number of minutes between pending code review prompts during the first hour of inactivity (the default is 5, and the effective max is 60). Note that hourly reminders will still take effect after the first 60 minutes.

Usage

hubot help crs - See a help document explaining how to use.

{GitHub pull request URL} [@user]   Add PR to queue and (optionally) notify @user or #channel
[hubot ]on it                       Claim the oldest _new_ PR in the queue
[hubot ]userName is on it           Tell hubot that userName has claimed the oldest _new_ PR in the queue
on *                                Claim all _new_ PRs
[userName is ]on cool-repo/123      Claim cool-repo/123 if no one else has claimed it
[userName is ]on cool               Claim a _new_ PR whose slug matches cool
hubot (nm|ignore) cool-repo/123		Delete cool-repo/123 from queue regardless of status
hubot (nm|ignore) cool            	Delete most recently added PR whose slug matches cool
hubot (nm|ignore)                   Delete most recently added PR from the queue regardless of status
hubot redo cool-repo/123            Allow another review _without_ decrementing previous reviewer's score
hubot (unclaim|reset) cool-repo/123 Reset CR status to new/unclaimed _and_ decrement reviewer's score
hubot list crs                      List all _unclaimed_ CRs in the queue
hubot list [status] crs             List CRs with matching optional status

Note that some commands require direct @hubot, some don't, and some work either way.

Code review statuses

new		PR has just been added to the queue, no one is on it.
claimed		Someone is on this PR
approved	PR was approved. Requires GitHub webhook.
merged		PR was merged and closed. Requires GitHub webhook.
closed		PR was closed without merging. Requires GitHub webhook.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].