{"id":15374677,"url":"https://github.com/mrtazz/pd","last_synced_at":"2025-04-15T15:12:20.467Z","repository":{"id":205814833,"uuid":"696368692","full_name":"mrtazz/pd","owner":"mrtazz","description":"pagerduty helper tooling","archived":false,"fork":false,"pushed_at":"2024-03-01T09:05:18.000Z","size":33,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T15:12:07.643Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrtazz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-09-25T15:51:58.000Z","updated_at":"2024-01-31T17:28:50.000Z","dependencies_parsed_at":"2023-11-07T00:08:13.753Z","dependency_job_id":"8cd2a0a9-f258-4e1d-8204-c82109f5df75","html_url":"https://github.com/mrtazz/pd","commit_stats":null,"previous_names":["mrtazz/pd"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtazz%2Fpd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtazz%2Fpd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtazz%2Fpd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtazz%2Fpd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrtazz","download_url":"https://codeload.github.com/mrtazz/pd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249094932,"owners_count":21211837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T13:59:28.999Z","updated_at":"2025-04-15T15:12:20.434Z","avatar_url":"https://github.com/mrtazz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pd\npagerduty helper tooling.\n\nThis is a small set of helpful commands to retrieve some data from PagerDuty\nin markdown format to put in notes or GitHub issues.\n\n## Usage\n\n### General usage\n\nThe tool expects `PD_TOKEN` to contain the PagerDuty API token:\n```\n% export PD_TOKEN=xxxxx\n```\n\n\n```\n% pd --help\nUsage: pd \u003ccommand\u003e\n\nFlags:\n  -h, --help    Show context-sensitive help.\n\nCommands:\n  incidents\n    get incidents from pagerduty API or csv\n\n  oncall --user-id=STRING --since=STRING\n    retrieve on-call schedules for user from the pagerduty API\n\n  version\n    print version and exit.\n\nRun \"pd \u003ccommand\u003e --help\" for more information on a command.\n```\n\n## Get incidents for a team\n```\n% pd incidents --help\nUsage: pd incidents\n\nget incidents from pagerduty API or csv\n\nFlags:\n  -h, --help                  Show context-sensitive help.\n\n      --team-id=STRING        PagerDuty team ID to get incidents for\n      --base-url=STRING       Base URL for pagerduty (e.g.  https://company.pagerduty.com\n      --since=\"2006-01-02\"    time range to get incidents for\n      --csv=STRING            PagerDuty incidents .csv export to use\n\n\n\n% pd incidents --team-id=P789 --since=2023-10-30\n|                      INCIDENT              | DESCRIPTION                         |             CREATED              | LAST UPDATE                      | DURATION |\n|--------------------------------------------|-------------------------------------|----------------------------------|----------------------------------|----------|\n| [123](https://pagerduty.com/incidents/123) | *api/ping is CRITICAL*              | 2023-09-20 10:00 UTC (11:00 CET) | 2023-09-20 10:18 UTC (11:18 CET) | 17m59s   |\n| [456](https://pagerduty.com/incidents/456) | *database/healthcheck is CRITICAL*  | 2023-09-20 11:00 UTC (12:00 CET) | 2023-09-20 11:37 UTC (12:37 CET) | 37m1s    |\n```\n\n## Get times a user has been on-call\n\n```\n% pd oncall --help\nUsage: pd oncall --user-id=STRING --since=STRING\n\nretrieve on-call schedules for user from the pagerduty API\n\nFlags:\n  -h, --help              Show context-sensitive help.\n\n      --user-id=STRING    PagerDuty user ID to get incidents for\n      --since=STRING      time range to get incidents for, e.g. 2006-01-02\n\n% pd oncall --user-id=P123 --since=2023-09-05\nGetting on-call times for user 'mrtazz', with ID 'P123' since 2023-09-05 00:00:00 +0000 UTC:\n|   START    |    END     |            SCHEDULE            |\n|------------|------------|--------------------------------|\n| 2023-09-11 | 2023-09-18 | on-call-L2                     |\n| 2023-09-18 | 2023-09-25 | on-call-L1                     |\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtazz%2Fpd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrtazz%2Fpd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtazz%2Fpd/lists"}