Skip to content

Commit 0a35ed4

Browse files
committed
fix(action): removed unnecessary setOutput call
1 parent 097b726 commit 0a35ed4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/action.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { existsSync } from 'fs'
22
import { resolve } from 'path'
3-
import { getInput, setFailed, setOutput } from '@actions/core'
3+
import { getInput, setFailed } from '@actions/core'
44
import { context as eventContext, getOctokit } from '@actions/github'
55
import lint from '@commitlint/lint'
66
import { format } from '@commitlint/format'
@@ -150,7 +150,7 @@ const showLintResults = async ([from, to]) => {
150150
// this would be a good place to implement the setNeutral() when it's eventually implimented.
151151
// for now it can pass with a check mark.
152152
console.log('Passing despite errors ✅')
153-
setOutput(`You have commit messages with errors\n\n${formattedResults}`)
153+
console.log(formattedResults)
154154
} else if (formattedResults) {
155155
setFailedAction(formattedResults)
156156
} else {

src/action.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ describe('Commit Linter action', () => {
128128
await runAction()
129129

130130
td.verify(core.setFailed(), { times: 0, ignoreExtraArgs: true })
131+
td.verify(console.log(contains('wrong message 1')))
132+
td.verify(console.log(contains('wrong message 2')))
131133
td.verify(console.log(contains('Passing despite errors ✅')))
132-
td.verify(core.setOutput(contains('wrong message 1')))
133-
td.verify(core.setOutput(contains('wrong message 2')))
134134
})
135135

136136
it('should pass for push range with correct messages with failOnErrors set to false', async () => {

0 commit comments

Comments
 (0)