From 69ceb797df6c5467ef1f0d50f9caaf08f3841529 Mon Sep 17 00:00:00 2001 From: Nikhil Bhoski <47204011+nbhoski@users.noreply.github.com> Date: Tue, 13 Aug 2024 12:50:47 +0530 Subject: [PATCH] updated --- src/buildSummary.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/buildSummary.ts b/src/buildSummary.ts index ffe2fed..f819971 100644 --- a/src/buildSummary.ts +++ b/src/buildSummary.ts @@ -48,7 +48,15 @@ export function processAndDisplayBuildSummary() { if (existsSync(filePath)) { try { const bs = readFileSync(filePath, { encoding: 'utf8' }); - const data = JSON.parse(bs).map((t: { name: any; failed: { toString: () => any; }; description: any; duration: { toString: () => any; }; }) => [t.name, t.failed.toString(), t.description, t.duration.toString()]); + const data = JSON.parse(bs).map((t: { name: any; failed: { toString: () => any; }; skipped: { toString: () => any; }; description: any; duration: { toString: () => any; }; }) => { + if (t.failed.toString() === 'true') { + return [t.name, '🔴 Failed', t.description, t.duration.toString()]; + } else if (t.skipped.toString() === 'true') { + return [t.name, '🔵 Skipped', t.description, t.duration.toString()]; + } else { + return [t.name, '🟢 Success', t.description, t.duration.toString()]; + } + }); taskSummaryTableRows = [header, ...data];//getBuildSummaryTable(data); } catch (e) { console.error('An error occurred while reading the build summary file:', e);