Skip to content

Commit

Permalink
Made dedup_key usage consistent with integration key
Browse files Browse the repository at this point in the history
  • Loading branch information
JohJonker committed Mar 19, 2021
1 parent cae175f commit e6ca54c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Sends a critical PagerDuty alert, e.g. on action failure.

**Required:** the integration key for your PagerDuty service

`dedup_key`
`pagerduty-dedup-key`

**Optional:** a `dedup_key` for your alert. This will enable PagerDuty to coalesce multiple alerts into one.
More documentation is available [here](https://developer.pagerduty.com/docs/events-api-v2/trigger-events/).
Expand All @@ -30,5 +30,5 @@ In your `steps`:
uses: Entle/action-pagerduty-alert@0.1.0
with:
pagerduty-integration-key: '${{ secrets.PAGERDUTY_INTEGRATION_KEY }}'
dedup_key: github_workflow_failed
pagerduty-dedup-key: github_workflow_failed
```
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ inputs:
pagerduty-integration-key:
description: 'The integration key for your PagerDuty service'
required: true
dedup_key:
description: 'The key used to correlate triggers, acknowledges, and resolves for the same alert.'
pagerduty-dedup-key:
description: 'The key used to correlate PagerDuty triggers, acknowledges, and resolves for the same alert.'
required: false
runs:
using: 'node12'
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ try {
routing_key: integrationKey,
event_action: 'trigger',
};
const dedup_key = core.getInput('dedup_key');
if (dedup_key != '') {
alert.dedup_key = dedup_key;
const dedupKey = core.getInput('pagerduty-dedup-key');
if (dedupKey != '') {
alert.dedup_key = dedupKey;
}
sendAlert(alert);
} catch (error) {
Expand Down

0 comments on commit e6ca54c

Please sign in to comment.