Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit f48eeb7

Browse files
author
Tom Bell
committed
Merge pull request #929 from streeter/pagerduty-bugfix
Make sure inc.trigger_summary_data exists
2 parents d88ac41 + 538bf46 commit f48eeb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/scripts/pagerduty.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# hubot pager me incidents - return the current incidents
1111
# hubot pager me note <incident> <content> - add note to incident #<incident> with <content>
1212
# hubot pager me notes <incident> - show notes for incident #<incident>
13-
# hubot pager me problems - return all open inicidents
13+
# hubot pager me problems - return all open incidents
1414
# hubot pager me ack <incident> - ack incident #<incident>
1515
# hubot pager me resolve <incident> - resolve incident #<incident>
1616
#
@@ -276,7 +276,7 @@ module.exports = (robot) ->
276276
# SERVICEDESC: 'snapshot_repositories',
277277
# SERVICESTATE: 'CRITICAL',
278278
# HOSTSTATE: 'UP' },
279-
if inc.incident_number
279+
if inc.incident_number && inc.trigger_summary_data
280280
if inc.trigger_summary_data.description
281281
"#{inc.incident_number}: #{inc.trigger_summary_data.description} - assigned to #{inc.assigned_to_user.name}\n"
282282
else if inc.trigger_summary_data.pd_nagios_object == 'service'

0 commit comments

Comments
 (0)