Skip to content

Commit b39a7fb

Browse files
Merge pull request #20 from skylenet/fix-boolean-parsing
fix: proper boolean parsing using core.getBooleanInput()
2 parents 2012f2e + 1c56e55 commit b39a7fb

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

dist/index.js

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/action-handler.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export async function runAction(): Promise<void> {
1111
required: true
1212
})
1313
const jsonFilePath = core.getInput('json-file-path')
14-
const summary = core.getInput('summary')?.toLowerCase() !== 'false'
15-
const pullRequest = core.getInput('pull-request')?.toLowerCase() === 'true'
14+
const summary = core.getBooleanInput('summary')
15+
const pullRequest = core.getBooleanInput('pull-request')
1616

1717
const templateSource = readTemplate(templatePath)
1818
const jsonData = jsonFilePath ? readJsonFile(jsonFilePath) : {}
@@ -31,8 +31,6 @@ export async function runAction(): Promise<void> {
3131
console.log('Generated Markdown:')
3232
console.log(markdown)
3333

34-
console.log('summary' + summary)
35-
3634
if (summary) core.summary.addRaw(markdown).write()
3735

3836
getAllGitHubContext()

0 commit comments

Comments
 (0)