Skip to content

Commit

Permalink
Add support for filtering on escalation policy; display users at esca…
Browse files Browse the repository at this point in the history
…lation levels
  • Loading branch information
smstone committed Mar 27, 2024
1 parent ce99b77 commit 8859b68
Show file tree
Hide file tree
Showing 6 changed files with 25,519 additions and 505 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# PagerDuty On-call Action

A GitHub Action to find the next person on call through PagerDuty.
A GitHub Action to find who is on call through PagerDuty.

## Usage

```yml
name: Find next person on call
name: Find who is on call for a given schedule or escalation policy.
on:
schedule:
- cron: 0 8 * * 1
Expand All @@ -19,7 +19,9 @@ jobs:
with:
token: ${{ secrets.PAGERDUTY_TOKEN }}
schedule-id: ABCDEFG
- run: echo ${{ steps.pagerduty.outputs.person }} is on call
escalation-policy-id: ABCDEFG
- name: Print user who is on call at escalation level 1
run: echo ${{ steps.pagerduty.outputs.person }} is on call
```
See [action.yml](./action.yml) for accepted inputs.
13 changes: 9 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ inputs:
description: "PagerDuty API token"
required: true
schedule-id:
description: "ID of on-call schedule to look up"
required: true
description: "Schedule ID of on-call schedule to look up"
required: false
escalation-policy-id:
description: "Escalation policy ID of on-call schedule to look up"
required: false
start-date:
description: "Start date of on-call to query (in ISO8601)"
required: false
Expand All @@ -15,9 +18,11 @@ inputs:
required: false
outputs:
person:
description: "The person who's on call"
description: "Name of person on call at escalation level 1"
userId:
description: "PagerDuty user ID of person on call at escalation level 1"
runs:
using: "node16"
using: "node20"
main: "dist/index.js"
branding:
icon: "bell"
Expand Down
Loading

0 comments on commit 8859b68

Please sign in to comment.