Created
September 10, 2015 09:52
-
-
Save matsuhisa/a9136975cb74fdcb6c48 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = (robot) -> | |
github = require('githubot')(robot) | |
robot.router.post '/github', (req, res) -> | |
room = 'general' | |
issue = req.body.issue ? req.body.pull_request | |
type = if req.body.pull_request then 'Pull Request' else 'issue' | |
if req.body.action in ['unlabeled'] | |
if req.body.label.name == "wip" | |
assignee = if issue.assignee then issue.assignee.login else 'No Aassignee' | |
robot.messageRoom room, "#{assignee} レビューをお願いします!(#{type}) :dolphin: \n#{issue.title}\n#{issue.html_url}" | |
return res.end '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment