Skip to content

Commit 80ff37e

Browse files
committed
docs: add a changeset
1 parent 406e255 commit 80ff37e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/spotty-yaks-sniff.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hyperdx/api": minor
3+
---
4+
5+
feat: adjust alert template title and body to reflect alert state

packages/api/src/tasks/checkAlerts/template.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ interface Message {
8383
eventId: string;
8484
}
8585

86-
export const isAlertResolved = (state: AlertState): boolean => {
86+
export const isAlertResolved = (state?: AlertState): boolean => {
8787
return state === AlertState.OK;
8888
};
8989

@@ -318,7 +318,7 @@ export const buildAlertMessageTemplateTitle = ({
318318
const handlebars = createHandlebarsWithHelpers();
319319

320320
// Add emoji prefix based on alert state
321-
const emoji = state && isAlertResolved(state) ? '✅ ' : '🚨 ';
321+
const emoji = isAlertResolved(state) ? '✅ ' : '🚨 ';
322322

323323
if (alert.source === AlertSource.SAVED_SEARCH) {
324324
if (savedSearch == null) {

0 commit comments

Comments
 (0)