From 8681723f2ab159ddf06b5a402e119def43dda31b Mon Sep 17 00:00:00 2001 From: RhenCloud Date: Thu, 27 Aug 2026 21:24:50 +0800 Subject: [PATCH] feat(check): add build log link for failed Cloudflare checks Failed check_run messages now include a Build Log field linking to check_run.details_url (the Cloudflare build log page). --- server/lib/formatters/check.ts | 9 +++++++++ server/lib/lib/locales/en.ts | 1 + server/lib/lib/locales/zh.ts | 1 + 3 files changed, 11 insertions(+) diff --git a/server/lib/formatters/check.ts b/server/lib/formatters/check.ts index 05f1ad9..2863f2c 100644 --- a/server/lib/formatters/check.ts +++ b/server/lib/formatters/check.ts @@ -171,6 +171,7 @@ export function formatCheckRun( name?: string; conclusion?: string; html_url?: string; + details_url?: string; status?: string; output?: { title?: string; summary?: string }; }; @@ -196,6 +197,14 @@ export function formatCheckRun( }); } + if (status === "failure" && checkRun.details_url) { + fields.push({ + name: t("fields.build_log"), + value: `[${t("fields.build_log")}](${checkRun.details_url})`, + inline: false, + }); + } + return buildMessage( { author, diff --git a/server/lib/lib/locales/en.ts b/server/lib/lib/locales/en.ts index df4797d..2b26047 100644 --- a/server/lib/lib/locales/en.ts +++ b/server/lib/lib/locales/en.ts @@ -75,6 +75,7 @@ export const en = { renamed: "Renamed", details: "Details", branch_tag: "Branch/Tag", + build_log: "Build Log", }, common: { footer: "{repo}", diff --git a/server/lib/lib/locales/zh.ts b/server/lib/lib/locales/zh.ts index 9c32ea4..dbaa580 100644 --- a/server/lib/lib/locales/zh.ts +++ b/server/lib/lib/locales/zh.ts @@ -75,6 +75,7 @@ export const zh = { renamed: "已重命名", details: "详情", branch_tag: "分支/标签", + build_log: "构建日志", }, common: { footer: "{repo}",