hubot-archive / hubot-pager-me

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

Only send one message for who's on call #50

Closed technicalpickles closed 8 years ago

technicalpickles commented 8 years ago

One problem I've found with who's on call is that it sends one message per schedule that matches. That means flooding 20 messages if you have 20 schedules.

This uses the async library to gather the schedules, and send them out as one message instead.

stephenyeargin commented 8 years ago

:+1:

technicalpickles commented 8 years ago

There's a few other places that could use this, like "am I on call". I'm going to take a pass at some other refactorings to see if there's a better way to be doing this across multiple of the commands.

technicalpickles commented 8 years ago

I updated this to work on am I on-call and pager my schedule. I also addressed the "Not found" I mentioned over on https://github.com/hubot-scripts/hubot-pager-me/pull/48#discussion_r40929209 cc @dirkaholic