mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
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).
This commit is contained in:
parent
1375db9a20
commit
8681723f2a
3 changed files with 11 additions and 0 deletions
|
|
@ -171,6 +171,7 @@ export function formatCheckRun(
|
||||||
name?: string;
|
name?: string;
|
||||||
conclusion?: string;
|
conclusion?: string;
|
||||||
html_url?: string;
|
html_url?: string;
|
||||||
|
details_url?: string;
|
||||||
status?: string;
|
status?: string;
|
||||||
output?: { title?: string; summary?: 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(
|
return buildMessage(
|
||||||
{
|
{
|
||||||
author,
|
author,
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ export const en = {
|
||||||
renamed: "Renamed",
|
renamed: "Renamed",
|
||||||
details: "Details",
|
details: "Details",
|
||||||
branch_tag: "Branch/Tag",
|
branch_tag: "Branch/Tag",
|
||||||
|
build_log: "Build Log",
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
footer: "{repo}",
|
footer: "{repo}",
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ export const zh = {
|
||||||
renamed: "已重命名",
|
renamed: "已重命名",
|
||||||
details: "详情",
|
details: "详情",
|
||||||
branch_tag: "分支/标签",
|
branch_tag: "分支/标签",
|
||||||
|
build_log: "构建日志",
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
footer: "{repo}",
|
footer: "{repo}",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue