fix(check): show build log link for failed check suites too

The Build Log field was only added to check_run messages; failed
check_suite messages now also link check_suite.details_url.
This commit is contained in:
RhenCloud 2026-08-27 21:33:46 +08:00
parent 8681723f2a
commit b2db616865
No known key found for this signature in database
GPG key ID: A574A617378C4E0B

View file

@ -28,6 +28,7 @@ export function formatCheckSuite(
status?: string; status?: string;
app?: { name?: string }; app?: { name?: string };
html_url?: string; html_url?: string;
details_url?: string;
}; };
const status = workflowStatus(suite.status, suite.conclusion); const status = workflowStatus(suite.status, suite.conclusion);
@ -68,6 +69,14 @@ export function formatCheckSuite(
}); });
} }
if (status === "failure" && suite.details_url) {
fields.push({
name: t("fields.build_log"),
value: `[${t("fields.build_log")}](${suite.details_url})`,
inline: false,
});
}
return buildMessage( return buildMessage(
{ {
author, author,