Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor & document overrides_bulk_operations #87

Open
ethanmsl opened this issue Feb 11, 2023 · 0 comments
Open

refactor & document overrides_bulk_operations #87

ethanmsl opened this issue Feb 11, 2023 · 0 comments

Comments

@ethanmsl
Copy link
Contributor

ethanmsl commented Feb 11, 2023

No documentation on what it wants.
Is based on this repo.
Which documents what it wants in internal comments:

# Script to override all on-call schedules for a vacationing user with another user for the given time period
# CLI Usage: ./create_vacation_overrides api_key vacationing_user_name overriding_user_name vacation_start_date vacation_end_date
#   api_key: PagerDuty API access token
#   vacationing_user_name: Full name of the user going on vacation - must be in quotes
#   overriding_user_name: Full name of the user overriding the vacationing user
#   vacation_start_date: Date on which the vacation starts
#   vacation_end_date: Date on which the vacation ends

As we're planning a progressive refactor and documentation it may be most efficient to refactor and document this as part of that effort.


meh, slash here's a stop-gap:

get_overrides
description:
"Gets all overrides in a schedule and export to a CSV file. The first column of output will be the schedule ID and the second should be the override ID, and the third will be a column identifying the user and time."

--api-key: "REST API key"
--csv-file: "Output CSV file. Data will begin in the very first row; no column names."
--start: "Start date of search"
--end: "End date of search"
--schedules': "IDs of schedules in which to find overrides. If unspecified, all schedules will be included."


vacation_overrides
For a given user going on vacation, and another given user who will fill their shoes while away, create overrides on all the vacationing user's schedules, such that the replacement user covers all the shifts that the vacationing user will be gone.

--vacationer: "Login email address of the user who is going on vacation."
--substitute: "Login email address of the user who is covering the shifts of the vacationing user."
--api-key: "PagerDuty REST API key to use for operations."
--start: "Start date of the vacation."
--end: "End date of the vacation."
--schedules: "IDs of schedules in which to create overrides. If unspecified, all schedules will be included."


mass_delete_overrides
Deletes overrides listed in a CSV file. The first column should be the schedule ID and the second should be the override ID. More columns can be included after the first.
--api-key: "REST API key"
--csv-file: "Path to input CSV file. Data should begin in the very first row; no column names."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant