hubot-archive / hubot-pager-me

PagerDuty integration for Hubot
https://www.npmjs.com/package/hubot-pager-me
MIT License
73 stars 92 forks source link

Added code for Kiosk mode #122

Closed eldios closed 11 months ago

eldios commented 5 years ago

I'm here proposing a big feature, that I called "Kiosk mode", referring to regular self-service Kiosk you would find in stations and airports.

The use case is to use Hubot-pager-me in a way that is possible to "safely" hand it over to customers so that they can only see what they're allowed to (by the restrictions of Services and Schedules) and by only be able to "open incidents to the person on call" by disabling all the other commands (through the "help module" which already does that).

e.g:

>help
CustomerBot help - Displays all of the help commands that this bot knows about.
CustomerBot help <query> - Displays all help commands that match <query>.
CustomerBot open incident <schedule> <msg> - create a new incident with <msg> and contact the person on call for <schedule>
CustomerBot who's on call - return a list of services and who is on call for them
CustomerBot who's on call for <schedule> - return the username of who's on call for any schedule matching 

> who's on call
* "Emanuele Lele Calo" is on call for "Customer Support"

> open incident "Customer Support" everything is on fire, please send help ASAP!
Incident correctly opened! :pager: Now assigning the person OnCall ...
:pager: assigned to Emanuele Lele Calo!

Code as it is now is not working cause it needs another fix that I'm also sending in a different PR (in order to be able to mangle "incidents" in a API v2 compatible way).

Open to clarifications if needed.

eldios commented 5 years ago

needs https://github.com/hubot-scripts/hubot-pager-me/pull/126