Skip to content

Commit

Permalink
Merge pull request #4 from marcelocarlos/fix-typo
Browse files Browse the repository at this point in the history
Fix issue with wrong output var name
  • Loading branch information
marcelocarlos authored Jan 31, 2024
2 parents cb94ce0 + 7743155 commit d5efb5c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12720,7 +12720,12 @@ async function run() {
var outputTitle = core.getInput("output_title")
var outputSummary = core.getInput("output_summary")

var outputText = core.getInput("output_text") != "" ? core.getInput("output_text") : external_fs_.readFileSync(core.getInput("output_source_file"), 'utf8')
var outputText = ""
if (core.getInput("output_text") != "") {
outputText = core.getInput("output_text")
} else if (core.getInput("output_source_file") != "") {
outputText = external_fs_.readFileSync(core.getInput("output_source_file"), 'utf8')
}

var outputAnnotations = core.getInput("output_annotations")
if (outputAnnotations != "") {
Expand Down Expand Up @@ -12748,7 +12753,7 @@ async function run() {
output: {
title: outputTitle,
summary: outputSummary,
text: outText,
text: outputText,
annotations: outputAnnotations,
images: outputImages
},
Expand Down
9 changes: 7 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ async function run() {
var outputTitle = core.getInput("output_title")
var outputSummary = core.getInput("output_summary")

var outputText = core.getInput("output_text") != "" ? core.getInput("output_text") : fs.readFileSync(core.getInput("output_source_file"), 'utf8')
var outputText = ""
if (core.getInput("output_text") != "") {
outputText = core.getInput("output_text")
} else if (core.getInput("output_source_file") != "") {
outputText = fs.readFileSync(core.getInput("output_source_file"), 'utf8')
}

var outputAnnotations = core.getInput("output_annotations")
if (outputAnnotations != "") {
Expand Down Expand Up @@ -45,7 +50,7 @@ async function run() {
output: {
title: outputTitle,
summary: outputSummary,
text: outText,
text: outputText,
annotations: outputAnnotations,
images: outputImages
},
Expand Down

0 comments on commit d5efb5c

Please sign in to comment.