-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't take pager for schedule like Incident.*
#223
Comments
Tagging #49, because it would make it a lot easier to debug if we could put a test case around it. So what I think is happening is that it is looking up an incident named "Commander 5". I don't think that's what you intended. Either way, it shouldn't bomb out when it can't find a matching incident. Going to knock that out.
|
vs.
Those seem to do very different things. Is the take away from this issue that this plugin can't support overriding PagerDuty schedules with names that start with "Incident"? It seems like ensuring regexes in the plugin are case sensitive would address my issue... |
Ah, I track now. One reason to keep the commands case insensitive is because we've all goofed up when typing something in a hurry. What I think we can do, though, is address the inadvertent collision between the commands. hubot-pager-me/src/scripts/pagerduty.js Lines 95 to 96 in cfd8ee2
This is a rather greedy regex. The only two formats an incident ID can take are Aside from the fix in #224 to keep the bot from crashing, tightening up that line would likely resolve the issue you're seeing. |
@johnseekins-pathccm Try out 4fc0cdf |
Looks promising:
|
Released with |
If I say
@Hubot pager me Incident Commander 5
, Hubot crashes:This appears to be a matching issue with https://github.com/hubot-archive/hubot-pager-me/blob/main/src/scripts/pagerduty.js#L95 doing case-insensitive matching?
Any advice on fixing this would be great.
The text was updated successfully, but these errors were encountered: