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

HUBOT_PAGERDUTY_SERVICES seems to not work #109

Closed auduny closed 5 years ago

auduny commented 7 years ago

Hi.

I've added HUBOT_PAGERDUTY_SERVICES to limit hubot to report on only one service

But "who's on call?" still returns all on-call schedules? Is that intentional?

eldios commented 5 years ago

any news on this? I'm having the same behavior almost a year later.

stephenyeargin commented 5 years ago

Schedule call lands here:

https://github.com/hubot-scripts/hubot-pager-me/blob/75fbe3060cf92bd2421f18c1ed2f06f9dd7186c1/src/pagerduty.coffee#L132-L142

Which supposedly appends a query string here:

https://github.com/hubot-scripts/hubot-pager-me/blob/75fbe3060cf92bd2421f18c1ed2f06f9dd7186c1/src/pagerduty.coffee#L36-L37

That last bit may not match the on-call endpoint, so that's what would need to be adjusted. I do not have a PagerDuty account any longer, but that should get somebody going in the right direction.

eldios commented 5 years ago

Is seems that the problem is that the check on line 36 is checking for incident while the who's on call command uses the /schedules link. One further level of problem is that the HUBOT_PAGERDUTY_SERVICES is specifying "services" as the name implies, so a further check would be needed in order to understand what "schedules" to query.

eldios commented 5 years ago

Trying to propose a different approach here with a little addition:

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

eldios commented 5 years ago

@stephenyeargin could you please take a look? If that's a reasonable feature we may work on expanding the same approach to all the other commands.

stephenyeargin commented 5 years ago

Yep, I think this would be fine. Thanks for working on it. Left a request for some documentation updates.

stephenyeargin commented 5 years ago

Closed via #117