Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Commit

Permalink
fix: numFailures is not required. Add reportTitle param
Browse files Browse the repository at this point in the history
fix:  numFailures is not required. Add reportTitle param
  • Loading branch information
paulpach authored Jul 19, 2020
2 parents 71e7881 + 40ba71b commit 82ab498
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ async function run(): Promise<void> {
const path = getInput('path')
const numFailures = parseInt(getInput('numFailures'))
const accessToken = getInput('access-token')
const title = getInput('reportTitle')

const results = await readResults(path)

Expand Down Expand Up @@ -49,7 +50,7 @@ async function run(): Promise<void> {
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
Expand Down

0 comments on commit 82ab498

Please sign in to comment.