fix(alerts): 收斂 Telegram 告警到 SRE 戰情室
Some checks failed
CD Pipeline / tests (push) Failing after 1m23s
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped
Code Review / ai-code-review (push) Successful in 15s

This commit is contained in:
Your Name
2026-06-12 11:03:07 +08:00
parent 46b4743fbc
commit ee2cc2bfc3
32 changed files with 165 additions and 113 deletions

View File

@@ -29,10 +29,8 @@ class TelegramWebhookProvider(NotificationProvider):
@property
def enabled(self) -> bool:
"""檢查 Telegram bot token 與 chat ID 是否配置"""
return bool(settings.OPENCLAW_TG_BOT_TOKEN) and bool(
settings.SRE_GROUP_CHAT_ID or settings.OPENCLAW_TG_CHAT_ID
)
"""檢查 Telegram bot token 與 AwoooI SRE 戰情室是否配置"""
return bool(settings.OPENCLAW_TG_BOT_TOKEN) and bool(settings.SRE_GROUP_CHAT_ID)
def _format(self, msg: NotificationMessage) -> str:
"""格式化執行結果為 Telegram 訊息"""