Skip to content

Commit

Permalink
Merge pull request #130 from goodeggs/fix-trigger-escalation-policy
Browse files Browse the repository at this point in the history
fix reassigning to an escalation policy
  • Loading branch information
stephenyeargin authored Jul 1, 2019
2 parents 50e3ba4 + 16d172d commit dc13024
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/scripts/pagerduty.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,15 @@ module.exports = (robot) ->
}
}


pagerduty.put "/incidents", data , (err, json) ->
if err?
robot.emit 'error', err, msg
return

if json?.incidents.length == 1
msg.reply ":pager: assigned to #{results.name}!"
else
msg.reply "Problem reassigning the incident :/"
pagerduty.put "/incidents", data , (err, json) ->
if err?
robot.emit 'error', err, msg
return

if json?.incidents.length == 1
msg.reply ":pager: assigned to #{results.name}!"
else
msg.reply "Problem reassigning the incident :/"
, 10000

robot.respond /(?:pager|major)(?: me)? ack(?:nowledge)? (.+)$/i, (msg) ->
Expand Down

0 comments on commit dc13024

Please sign in to comment.