From 339331212fdeba516bb7706cd63db65485c8c7ae Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 8 Mar 2024 09:23:28 -0800 Subject: [PATCH] In new bot comment, distinguish runs with interesting results (#977) --- .changeset/big-rules-act.md | 2 ++ packages/dtslint-runner/src/post-results.ts | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .changeset/big-rules-act.md diff --git a/.changeset/big-rules-act.md b/.changeset/big-rules-act.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/big-rules-act.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/dtslint-runner/src/post-results.ts b/packages/dtslint-runner/src/post-results.ts index 1586be8422..8076963183 100644 --- a/packages/dtslint-runner/src/post-results.ts +++ b/packages/dtslint-runner/src/post-results.ts @@ -21,10 +21,12 @@ async function main() { try { let newComment; + let emoji = "✅"; if (status === "fail") { newComment = `Hey @${userToTag}, it looks like the DT test run failed. Please check the log for more details.` + checkLogsMessage; + emoji = "❌"; } else { const mainErrors: Errors = []; if (mainErrorsPath) { @@ -44,6 +46,7 @@ async function main() { newComment = `Hey @${userToTag}, the results of running the DT tests are ready.\n`; const diffComment = getDiffComment(mainErrors, branchErrors); if (diffComment) { + emoji = "👀"; newComment += `There were interesting changes:\n`; if (newComment.length + diffComment.length + checkLogsMessage.length > 65535) { // hardlink directly into the output of this script @@ -68,8 +71,6 @@ async function main() { body: newComment, }); - const emoji = status !== "fail" ? "✅" : "👀"; - const toReplace = ``; let posted = false; for (let i = 0; i < 5; i++) {