fix(alerts): drop stand-down prefix on one-shot failures
This commit is contained in:
+12
-1
@@ -17,6 +17,17 @@ INFORMATIONAL = frozenset(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
FAILURE = frozenset(
|
||||||
|
{
|
||||||
|
"ProcedureFailed",
|
||||||
|
"ActionFailed",
|
||||||
|
"BuildFailed",
|
||||||
|
"RepoBuildFailed",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
ONE_SHOT = INFORMATIONAL | FAILURE
|
||||||
|
|
||||||
|
|
||||||
def _gb(value: Any) -> str: # noqa: ANN401
|
def _gb(value: Any) -> str: # noqa: ANN401
|
||||||
try:
|
try:
|
||||||
@@ -104,7 +115,7 @@ def format_alert(payload: dict) -> str:
|
|||||||
inner = data.get("data") or {}
|
inner = data.get("data") or {}
|
||||||
|
|
||||||
informational = kind in INFORMATIONAL
|
informational = kind in INFORMATIONAL
|
||||||
resolved = bool(payload.get("resolved")) and not informational
|
resolved = bool(payload.get("resolved")) and kind not in ONE_SHOT
|
||||||
|
|
||||||
if informational:
|
if informational:
|
||||||
icon = "ℹ️"
|
icon = "ℹ️"
|
||||||
|
|||||||
Reference in New Issue
Block a user