From 4b6f14d9a175d7e403660110bbd84d68536eea13 Mon Sep 17 00:00:00 2001 From: OG T Date: Thu, 9 Apr 2026 08:57:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(webhook):=20alertmanager=20=E8=B7=AF?= =?UTF-8?q?=E5=BE=91=20suggested=5Faction=20=E6=94=B9=E7=94=A8=20kubectl?= =?UTF-8?q?=5Fcommand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 1399 行: suggested_action.value (RESTART_DEPLOYMENT) → kubectl_command - 與 /alerts 路徑 887 行保持一致 - 修正 Telegram 顯示「kubectl rollout restart deployment/」後面空白的問題 - 2026-04-09 ogt: bug fix Co-Authored-By: Claude Sonnet 4.6 --- apps/api/src/api/v1/webhooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/api/v1/webhooks.py b/apps/api/src/api/v1/webhooks.py index ac13671d..d678f787 100644 --- a/apps/api/src/api/v1/webhooks.py +++ b/apps/api/src/api/v1/webhooks.py @@ -1396,7 +1396,7 @@ async def alertmanager_webhook( risk_level=risk_level.value, resource_name=target_resource, root_cause=root_cause, - suggested_action=analysis_result.suggested_action.value, + suggested_action=analysis_result.kubectl_command or analysis_result.suggested_action.value, estimated_downtime=estimated_downtime, hit_count=1, primary_responsibility=primary_responsibility,