From 40ba71b626ae7c7fcf3df00d0d4b71413d6df941 Mon Sep 17 00:00:00 2001 From: Alexander Boychenko Date: Thu, 16 Jul 2020 14:33:45 +0700 Subject: [PATCH] Fixes numFailures param. Add reportTitle param --- action.yml | 8 ++++++-- src/main.ts | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index d1a73fb..2de6f04 100644 --- a/action.yml +++ b/action.yml @@ -10,8 +10,12 @@ inputs: required: true numFailures: description: 'max number of failed tests to include' - require: true - default: 30 + required: false + default: "30" + reportTitle: + description: "Report title" + required: false + default: "Test Report" runs: using: 'node12' main: 'dist/index.js' diff --git a/src/main.ts b/src/main.ts index 1287602..027ee7c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -11,6 +11,7 @@ async function run(): Promise { const path = getInput('path') const numFailures = parseInt(getInput('numFailures')) const accessToken = getInput('access-token') + const title = getInput('reportTitle') const results = await readResults(path) @@ -49,7 +50,7 @@ async function run(): Promise { status: 'completed', conclusion: results.failed > 0 || results.passed === 0 ? 'failure' : 'success', output: { - title: 'Test Report', + title, summary, annotations: results.annotations.slice(0, numFailures), text: details