Set comment as output

Move the logic from the caller as a negation instead of trying to
negate it by hand.
This commit is contained in:
Josh Soref
2024-02-20 14:19:19 -05:00
parent 9129d7d40b
commit db6a5119ce
4 changed files with 24 additions and 15 deletions
+1 -7
View File
@@ -144,13 +144,7 @@ async function run(): Promise<void> {
summary.addScannedDependencies(changes)
printScannedDependencies(changes)
if (
config.comment_summary_in_pr === 'always' ||
(config.comment_summary_in_pr === 'on-failure' &&
process.exitCode === core.ExitCode.Failure)
) {
await commentPr(core.summary)
}
await commentPr(core.summary, config)
} catch (error) {
if (error instanceof RequestError && error.status === 404) {
core.setFailed(