Skip to content

Commit

Permalink
Do not print empty tables
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeysova committed Oct 6, 2022
1 parent e952817 commit 199dbeb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14918,8 +14918,10 @@ function main() {
const commentBody = [
SIZE_COMPARE_HEADING,
createCompareLink(owner, repo, latestRecord, currentHistoryRecord),
changesToMarkdownTable(significantChanges),
createCollapsibleMarkdown(`Files wasn't changed`, changesToMarkdownTable(foldedChanges)),
significantChanges.length > 0 ? changesToMarkdownTable(significantChanges) : '',
foldedChanges.length > 0
? createCollapsibleMarkdown(`Files wasn't changed`, changesToMarkdownTable(foldedChanges))
: '',
].join('\r\n');
const previousComment = yield previousCommentPromise;
if (previousComment) {
Expand Down
6 changes: 4 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,10 @@ async function main() {
const commentBody = [
SIZE_COMPARE_HEADING,
createCompareLink(owner, repo, latestRecord, currentHistoryRecord),
changesToMarkdownTable(significantChanges),
createCollapsibleMarkdown(`Files wasn't changed`, changesToMarkdownTable(foldedChanges)),
significantChanges.length > 0 ? changesToMarkdownTable(significantChanges) : '',
foldedChanges.length > 0
? createCollapsibleMarkdown(`Files wasn't changed`, changesToMarkdownTable(foldedChanges))
: '',
].join('\r\n');

const previousComment = await previousCommentPromise;
Expand Down

1 comment on commit 199dbeb

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚛 size-compare report

Comparing e9528172...199dbebb

File +/- Base Current +/- gzip Base gzip Current gzip
dist/index.js +0.01% 776 kB 776 kB +0.01% 170 kB 170 kB

Please sign in to comment.