martindstone / pagerduty-cli

A command line interface for PagerDuty
MIT License
91 stars 12 forks source link

Default to current user for `pd schedule override`? #50

Closed mwarkentin closed 1 year ago

mwarkentin commented 1 year ago

I'm wondering if it would make sense to default to your own user for scheduling overrides? That's my most common use case to schedule a short override if I'm doing some work that might trigger an alarm:

pd schedule override add --end="in 15 minutes" --id="123ABCD" -u "ABCD123"

would become:

pd schedule override add --end="in 15 minutes" --id="123ABCD"

But I could still specify it if I was to schedule an override for some other user.

martindstone commented 1 year ago

I do think that makes sense in general, I am somewhat worried about accidentally putting in an override that you didn't intend... what do you think about a -m/--me flag just to make it clear what you're doing?

mwarkentin commented 1 year ago

Yep that would work for sure!

mwarkentin commented 1 year ago

Basically I've been hoping for this hubot functionality in the PD slack app for years: https://github.com/hubot-scripts/hubot-pager-me

But CLI will work great too!

martindstone commented 1 year ago

hey so I just put --me in 0.1.15 RC, and i am planning to promote that to stable next week barring any uncaught bugs... that should resolve both your issues... i will check out the hubot stuff, thanks for the link...

martindstone commented 1 year ago

Hi @mwarkentin i just promoted 0.1.15 to stable, which should resolve this for you... can you check it out and let me know?

mwarkentin commented 1 year ago

@martindstone thanks, just caught up on my GH notifications so didn't see this until now.

Works perfectly, thanks!

❯ pd schedule override add --end="in 1 minutes" --id="ABCDE12" --me
Adding an override to schedule ABCDE12... done