Openstatus www.openstatus.dev
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

๐Ÿ› alerting (#1022)

* ๐Ÿ› alerting

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

authored by

Thibault Le Ouay
autofix-ci[bot]
and committed by
GitHub
e715415b 87be3ed3

+6 -1
+2
apps/server/src/checker/alerting.test.ts
··· 15 15 monitorId: "1", 16 16 statusCode: 400, 17 17 notifType: "alert", 18 + cronTimestamp: 123456, 19 + incidentId: "1", 18 20 }); 19 21 expect(fn).toHaveBeenCalled(); 20 22 });
+1 -1
apps/server/src/checker/alerting.ts
··· 25 25 message?: string; 26 26 notifType: "alert" | "recovery" | "degraded"; 27 27 cronTimestamp: number; 28 - incidentId?: string; 28 + incidentId: string; 29 29 }) => { 30 30 console.log(`๐Ÿ’Œ triggerAlerting for ${monitorId}`); 31 31 const notifications = await db
+3
apps/server/src/checker/index.ts
··· 102 102 message, 103 103 notifType: "degraded", 104 104 cronTimestamp, 105 + incidentId: `${cronTimestamp}`, 105 106 }); 106 107 } 107 108 } ··· 178 179 message, 179 180 notifType: "alert", 180 181 cronTimestamp, 182 + incidentId: String(newIncident[0].id), 181 183 }); 182 184 183 185 if (newIncident.length > 0) { ··· 268 270 message, 269 271 notifType: "recovery", 270 272 cronTimestamp, 273 + incidentId: String(incident.id), 271 274 }); 272 275 273 276 const monitor = await db