From 4cace12f0090b5608c6134842eb9431b688c312f Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Tue, 10 May 2022 12:26:01 +0800 Subject: [PATCH] ci: fix file size diff comment display (#784) --- .github/workflows/update-pr-metadata.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-pr-metadata.yml b/.github/workflows/update-pr-metadata.yml index 0e9aadda3..2c0fd09c7 100644 --- a/.github/workflows/update-pr-metadata.yml +++ b/.github/workflows/update-pr-metadata.yml @@ -80,12 +80,12 @@ jobs: const filesHeader = `|Name|Diff|\n|---|---|\n`; const filesData = result.map((row) => { const [diff, filename] = row.split('\t'); - return `|${filename}|${format(Number(diff))}|\n`; - }); + return `|${filename}|${format(Number(diff))}|`; + }).join('\n'); return `#### Size Diff (Compare to \`master\`)\n**Total** ${format(diff)}\n${ result.length ? `\n${filesHeader}${filesData}` : '' - }`; + }\n`; - uses: marocchino/sticky-pull-request-comment@v2 with: