mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 14:27:10 +01:00
Add badge title customization
This commit is contained in:
parent
83b7f42d2d
commit
49667db475
5 changed files with 26 additions and 17 deletions
|
|
@ -41,6 +41,7 @@ class TestReporter {
|
|||
readonly failOnError = core.getInput('fail-on-error', {required: true}) === 'true'
|
||||
readonly workDirInput = core.getInput('working-directory', {required: false})
|
||||
readonly onlySummary = core.getInput('only-summary', {required: false}) === 'true'
|
||||
readonly badgeTitle = core.getInput('badge-title', {required: false})
|
||||
readonly token = core.getInput('token', {required: true})
|
||||
readonly octokit: InstanceType<typeof GitHub>
|
||||
readonly context = getCheckRunContext()
|
||||
|
|
@ -166,9 +167,9 @@ class TestReporter {
|
|||
// })
|
||||
|
||||
core.info('Creating report summary')
|
||||
const {listSuites, listTests, onlySummary} = this
|
||||
const {listSuites, listTests, onlySummary, badgeTitle} = this
|
||||
const baseUrl = ''
|
||||
const summary = getReport(results, {listSuites, listTests, baseUrl, onlySummary})
|
||||
const summary = getReport(results, {listSuites, listTests, baseUrl, onlySummary, badgeTitle})
|
||||
core.info('Summary content:')
|
||||
core.info(summary)
|
||||
await fs.promises.writeFile(this.path.replace('*.trx', 'test-summary.md'), summary)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue