Skip to content

Commit

Permalink
Fix OpsGenie alert close call
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Smith committed Oct 28, 2021
1 parent 01e7253 commit 014b419
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
4 changes: 3 additions & 1 deletion lib/cjs/providers/OpsGenieAlertProvider.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/cjs/providers/OpsGenieAlertProvider.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion lib/esm/providers/OpsGenieAlertProvider.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/esm/providers/OpsGenieAlertProvider.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "error-sync-lib",
"version": "0.1.10",
"version": "0.1.11",
"private": "true",
"scripts": {
"build": "yarn build:esm && yarn build:cjs",
Expand Down
4 changes: 3 additions & 1 deletion src/providers/OpsGenieAlertProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,14 @@ export class OpsGenieAlertProvider implements AlertProviderInterface {
opsGenie.alertV2.close({
identifier: alert.clientId,
identifierType: 'alias',
}, {
note: `Auto-closed by error-sync-lib`,
}, (error, response) => {
return (error ? reject(error) : resolve(response));
});
});

return this.createAlert(alert);
return await this.createAlert(alert);
}

public async generateAlertContent(errorGroup: ErrorGroup): Promise<AlertContent> {
Expand Down

0 comments on commit 014b419

Please sign in to comment.