Permalink
Browse files

Respond to deploy commands only when mentioned.

  • Loading branch information...
1 parent d94a5c7 commit 6ca8fcf5afd7243025f6b4bd8cd5779783848c8b @uchouhan uchouhan committed Apr 18, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 deploy.coffee
View
@@ -5,7 +5,7 @@
# deploy <application> to <environment> - Deploys <application> to <environment>.
module.exports = (robot) ->
- robot.hear /maintain (.*) on (.*)$/i, (msg) ->
+ robot.respond /maintain (.*) on (.*)$/i, (msg) ->
@exec = require('child_process').exec
application = msg.match[1]
@@ -30,7 +30,7 @@ module.exports = (robot) ->
else
msg.send "#{user.name} is not authorized to deploy to #{environment}."
- robot.hear /restore (.*) on (.*)$/i, (msg) ->
+ robot.respond /restore (.*) on (.*)$/i, (msg) ->
@exec = require('child_process').exec
application = msg.match[1]
@@ -55,7 +55,7 @@ module.exports = (robot) ->
else
msg.send "#{user.name} is not authorized to deploy to #{environment}."
- robot.hear /deploy (.*) to (.*)$/i, (msg) ->
+ robot.respond /deploy (.*) to (.*)$/i, (msg) ->
@exec = require('child_process').exec
application = msg.match[1].toLowerCase()

0 comments on commit 6ca8fcf

Please sign in to comment.