-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add types for status alert #713
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably this is a bit of a different usage case, Do you foresee a future where we might want to disable individual alerts for monitor instead of just disabling them all which is what the PR is doing.
So its of the type here it would be like alert: []Alerts
for a given monitor. /cc @dominiqueclarke
src/push/monitor.ts
Outdated
@@ -24,6 +24,7 @@ | |||
*/ | |||
|
|||
import { mkdir, rm, readFile } from 'fs/promises'; | |||
import get from 'lodash/get'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not used.
I think we envision the type being an object representing the different alerts, rather than an array, which we can add to later. So let's say we added a tls alert, the type would be
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but you may want to add a test.
Also, and this isn't a blocker for me, it doesn't support nested yaml for lightweight monitors, only alert.status.enabled
add types for status alert
status alert can be enabled/disable using
in lightweight: