From 4bb68fffaa73218e7a2685d41804e72849a780c8 Mon Sep 17 00:00:00 2001 From: Linas Daneliukas Date: Mon, 11 Oct 2021 15:35:03 +0300 Subject: [PATCH] Update check title and remove icon --- src/main.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index 4fdc3a0..993fdde 100644 --- a/src/main.ts +++ b/src/main.ts @@ -19,7 +19,6 @@ import {SwiftXunitParser} from './parsers/swift-xunit/swift-xunit-parser' import {normalizeDirPath, normalizeFilePath} from './utils/path-utils' import {getCheckRunContext} from './utils/github-utils' -import {Icon} from './utils/markdown-utils' async function main(): Promise { try { @@ -183,7 +182,11 @@ class TestReporter { const isFailed = this.failOnError && results.some(tr => tr.result === 'failed') const conclusion = isFailed ? 'failure' : 'success' - const icon = isFailed ? Icon.fail : Icon.success + + const passed = results.reduce((sum, tr) => sum + tr.passed, 0) + const failed = results.reduce((sum, tr) => sum + tr.failed, 0) + const skipped = results.reduce((sum, tr) => sum + tr.skipped, 0) + let shortSummary = `${passed} passed, ${failed} failed and ${skipped} skipped ` core.info(`Updating check run conclusion (${conclusion}) and output`) const resp = await this.octokit.rest.checks.update({ @@ -191,7 +194,7 @@ class TestReporter { conclusion, status: 'completed', output: { - title: `${name} ${icon}`, + title: shortSummary, summary, annotations },