fix(awooop): route ci notifications through event mirror
Some checks failed
Code Review / ai-code-review (push) Successful in 14s
CD Pipeline / tests (push) Successful in 1m18s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled

This commit is contained in:
Your Name
2026-05-12 13:58:08 +08:00
parent d356cd32fc
commit ad8ead2546
11 changed files with 461 additions and 59 deletions

View File

@@ -43,7 +43,6 @@ from src.services.security_interceptor import (
get_security_interceptor,
)
from src.services.chat_manager import get_chat_manager
from src.services.notification_matrix import resolve_chat_ids # ADR-093 路由矩陣
# =============================================================================
# Snooze/Silence Redis Keys (2026-03-27 P1 優化)
@@ -996,12 +995,18 @@ class CICDProgressMessage:
safe_url = html.escape(self.workflow_url, quote=True)
workflow_link = f"\n🔗 <a href='{safe_url}'>Workflow</a>"
detail = ""
if self.message:
safe_message = html.escape(self.message[:240])
detail = f"\n📝 {safe_message}"
# 簡潔訊息
stage_label = f" | {safe_stage}" if safe_stage else ""
message = (
f"{status_emoji} <b>[AWOOOI CI/CD]</b>{stage_label}\n"
f"📦 {safe_job}{duration_str}"
f"{commit_info}"
f"{detail}"
f"{workflow_link}"
)
@@ -6168,7 +6173,7 @@ class TelegramGateway:
s = await k8s.get_pod_status_summary(namespace="awoooi-prod")
running, total = s.get("running", 0), s.get("total", 0)
problems = s.get("problem_pods", [])
lines = [f"<b>🖥 Cluster 狀態</b>", f"• Pods: {running}/{total} Running"]
lines = ["<b>🖥 Cluster 狀態</b>", f"• Pods: {running}/{total} Running"]
if problems:
lines.append(f"• 異常: {len(problems)}")
for p in problems[:5]: