Comments (6)
Looks promising:
hubot-dev> @hubot-dev pager me Incident Commander Secondary 5
{"level":20,"time":1712238728522,"pid":19547,"hostname":"John-Seekins-MacBook-Pro-16-inch-2023-","name":"hubot-dev","msg":"Message '@hubot-dev pager me Incident Commander Secondary 5' matched regex //^\\s*[@]?hubot\\-dev[:,]?\\s*(?:pager( me)? (?!schedules?\\b|overrides?\\b|my schedule\\b)(.+) (\\d+)$)/i/; listener.options = { id: null }"}
from hubot-pager-me.
Released with v4.0.3
from hubot-pager-me.
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.
hubot pager schedule Incident Commander 5
may be more what you're looking for.
from hubot-pager-me.
hubot pager schedule <schedule> [days] - show <schedule>'s shifts for the next x [days] (default 30 days)
vs.
hubot pager me <schedule> <minutes> - take the pager for <minutes> minutes
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...
from hubot-pager-me.
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 \w+
or \d+
, with the latter being the more likely of the two used in chat. L96 tells the processor to stop looking for anything else. Because the schedule lookup is registered after the incident lookup, it never falls through to it.
Aside from the fix in #224 to keep the bot from crashing, tightening up that line would likely resolve the issue you're seeing.
from hubot-pager-me.
@johnseekins-pathccm Try out 4fc0cdf
from hubot-pager-me.
Related Issues (20)
- Feature Request: Enable Service to Room map so specific teams can handle issues for specific services HOT 4
- am I on call HOT 8
- "who's on call" broke in hubot-pager-me 2.1.14 HOT 15
- who's on call for XYZ loops if multiple matches exist HOT 10
- Pager schedules returns only the first 100 schedules HOT 2
- Support for v2 API? HOT 17
- Doesn't seem to support spaces in the name of a schedule HOT 1
- Incorrect PD API call? HOT 1
- Doesn't return on-call schedule HOT 1
- Problem retrieving user email HOT 3
- No response given for invalid issue numbers HOT 3
- redacted
- Duplicated output
- HUBOT_PAGERDUTY_SERVICES seems to not work HOT 7
- No oncalls returns if `HUBOT_PAGERDUTY_SCHEDULES` is unset HOT 5
- Incidents reassigned to HUBOT_PAGERDUTY_FROM_EMAIL HOT 8
- Limit commands
- Hello world HOT 1
- Let's convert the script from CoffeeScript to JavaScript HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hubot-pager-me.