fix regex in trigger to accept '@' character

This commit is contained in:
mbaum0 2022-02-21 13:37:19 +01:00
Родитель 65c0dde1c8
Коммит ada02c287f
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -129,7 +129,7 @@ module.exports = (robot) ->
# hubot pager trigger <user> <severity> <msg> - create a new incident with <msg> and assign it to <user>. Severity must be one of: critical, error, warning or info.
# hubot pager trigger <schedule> <severity> <msg> - create a new incident with <msg> and assign it the user currently on call for <schedule>. Severity must be one of: critical, error, warning or info.
robot.respond /(pager|major)( me)? (?:trigger|page) ([\w\-]+)( (critical|error|warning|info) )?(.+)$/i, (msg) ->
robot.respond /(pager|major)( me)? (?:trigger|page) (?:@?)([\w\-]+)( (critical|error|warning|info) )?(.+)$/i, (msg) ->
msg.finish()
if pagerduty.missingEnvironmentForApi(msg)