diff --git a/scripts/ci/ci_health_report.py b/scripts/ci/ci_health_report.py index a9e72eaad..12b52bfb4 100644 --- a/scripts/ci/ci_health_report.py +++ b/scripts/ci/ci_health_report.py @@ -32,7 +32,8 @@ def run_health_check(limit: int) -> dict: sys.executable, os.path.join(script_dir, "ci_health_check.py"), "--json", - "--limit", str(limit), + "--limit", + str(limit), ] env = os.environ.copy() # 确保GITEA_TOKEN传递 @@ -85,7 +86,12 @@ def build_feishu_card(data: dict) -> dict: fail = s["failure"] rate = (succ / total * 100) if total > 0 else 0 icon = "🟢" if rate >= 90 else ("🟡" if rate >= 70 else "🔴") - wf_name = wf.replace("ci-pipeline.yml", "CI Pipeline") .replace("code-review.yml", "Code Review") .replace("daily-check.yml", "Daily Check") .replace("preview-deploy.yml", "Preview Deploy") + wf_name = ( + wf.replace("ci-pipeline.yml", "CI Pipeline") + .replace("code-review.yml", "Code Review") + .replace("daily-check.yml", "Daily Check") + .replace("preview-deploy.yml", "Preview Deploy") + ) wf_lines.append(f"{icon} **{wf_name}**: {rate:.0f}% ({succ}/{total},失败{fail})") # 失败详情(最多显示5条)