Skip to content

Commit

Permalink
In new bot comment, distinguish runs with interesting results (#977)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Mar 8, 2024
1 parent 42c5f40 commit 3393312
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .changeset/big-rules-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
5 changes: 3 additions & 2 deletions packages/dtslint-runner/src/post-results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand All @@ -68,8 +71,6 @@ async function main() {
body: newComment,
});

const emoji = status !== "fail" ? "✅" : "👀";

const toReplace = `<!--result-${distinctId}-->`;
let posted = false;
for (let i = 0; i < 5; i++) {
Expand Down

0 comments on commit 3393312

Please sign in to comment.