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

Add ability to specify days when looking up schedules/overrides #75

Closed bisscuitt closed 8 years ago

bisscuitt commented 8 years ago

This adds the ability to specify days when looking up schedules and overrides:

Get the last 4 days of oncall schedule:

devbot> devbot pager schedule First UTC 4
* 2015-11-26T23:45:12+00:00 - 2015-11-27T00:59:00+00:00 user 1
* 2015-11-27T00:59:00+00:00 - 2015-11-27T12:59:00+00:00 user 2
* 2015-11-27T12:59:00+00:00 - 2015-11-28T00:59:00+00:00 user 1
* 2015-11-28T00:59:00+00:00 - 2015-11-30T12:59:00+00:00 user 2
* 2015-11-30T12:59:00+00:00 - 2015-12-01T00:59:00+00:00 user 3

Last 14 days of

devbot> devbot pager overrides First UTC 14
* (Q1GT8JQBWNDME7) 2015-11-26T12:59:00+00:00 - 2015-11-27T00:59:00+00:00 user 4

We have 12 hour shifts in our schedules spanning different timezones, so 30 days fills the scrollback.

I had to alter the pager me <schedule> <minutes> regex to disregard other commands that can now also end with digits, but this still works are normal.... providing your schedule is not specifically called schedule,schedules,override,overrides or my schedule. I'm keen to hear feedback on if there is a better way to do this.

stephenyeargin commented 8 years ago

I dig it (we have a lot of services and a daily rotation for on-call). :+1:

stephenyeargin commented 8 years ago

Released as part of v2.1.12

bisscuitt commented 8 years ago

Awesome. Thanks for the fast turn around ! :)