Skip to content

Instantly share code, notes, and snippets.

@matsuhisa
Created September 10, 2015 09:52
Show Gist options
  • Save matsuhisa/a9136975cb74fdcb6c48 to your computer and use it in GitHub Desktop.
Save matsuhisa/a9136975cb74fdcb6c48 to your computer and use it in GitHub Desktop.
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