Skip to content

Commit 4091104

Browse files
committed
adjust message
1 parent 1a6bfb4 commit 4091104

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

tools/ecosystem_compat_slack.ts

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,27 @@ function formatDuration(duration: number) {
3333
}
3434

3535
function createMessage(ecosystemReports: Record<string, EcosystemReport>) {
36-
let mrkdwn = "Package manager report\n";
36+
let mrkdwn = "## Package manager report\n\n";
3737

38+
mrkdwn += "| OS | npm | yarn | pnpm |\n";
39+
mrkdwn += "|----|-----|------|------|\n";
3840
for (const [os, report] of Object.entries(ecosystemReports)) {
39-
mrkdwn += `*${os}*\n`;
40-
mrkdwn += ` *npm*: exit code: ${report.npm.exitCode}, duration: ${
41+
mrkdwn += `| ${os} | `;
42+
mrkdwn += `${
43+
report.npm.exitCode === 0 ? "✅" : "❌"
44+
} code: ${report.npm.exitCode}, duration: ${
4145
formatDuration(report.npm.duration)
42-
}\n`;
43-
mrkdwn += ` *yarn*: exit code: ${report.yarn.exitCode}, duration: ${
46+
} | `;
47+
mrkdwn += `${
48+
report.yarn.exitCode === 0 ? "✅" : "❌"
49+
} code: ${report.yarn.exitCode}, duration: ${
4450
formatDuration(report.yarn.duration)
45-
}\n`;
46-
mrkdwn += ` *pnpm*: exit code: ${report.pnpm.exitCode}, duration: ${
51+
} | `;
52+
mrkdwn += `${
53+
report.npm.exitCode === 0 ? "✅" : "❌"
54+
} code: ${report.pnpm.exitCode}, duration: ${
4755
formatDuration(report.pnpm.duration)
48-
}\n`;
56+
} |\n`;
4957
}
5058

5159
return [

0 commit comments

Comments
 (0)