From 16fcb8f8625bb3aae016df7280b8fbf19865bcb3 Mon Sep 17 00:00:00 2001 From: Jason Silberman Date: Thu, 1 Aug 2019 10:37:20 -0700 Subject: [PATCH] fix: only show summary when not empty (#194) --- packages/@best/github-integration/src/analyze.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/@best/github-integration/src/analyze.ts b/packages/@best/github-integration/src/analyze.ts index 3b5ff401..582cee67 100644 --- a/packages/@best/github-integration/src/analyze.ts +++ b/packages/@best/github-integration/src/analyze.ts @@ -138,10 +138,14 @@ function generateCommentWithTables(result: BenchmarkComparison, handler: (node: if (node.type === "project" || node.type === "group") { const markdownTables = handler(node, baseCommit, targetCommit); - return { - ...tables, - [node.name]: markdownTables + if (markdownTables.length) { + return { + ...tables, + [node.name]: markdownTables + } } + + return tables; } return tables;