diff --git a/src/action.js b/src/action.js index d1cf47f9..fe124d74 100644 --- a/src/action.js +++ b/src/action.js @@ -1,6 +1,6 @@ import { existsSync } from 'fs' import { resolve } from 'path' -import { getInput, setFailed, setOutput } from '@actions/core' +import { getInput, setFailed } from '@actions/core' import { context as eventContext, getOctokit } from '@actions/github' import lint from '@commitlint/lint' import { format } from '@commitlint/format' @@ -150,7 +150,7 @@ const showLintResults = async ([from, to]) => { // this would be a good place to implement the setNeutral() when it's eventually implimented. // for now it can pass with a check mark. console.log('Passing despite errors ✅') - setOutput(`You have commit messages with errors\n\n${formattedResults}`) + console.log(formattedResults) } else if (formattedResults) { setFailedAction(formattedResults) } else { diff --git a/src/action.test.js b/src/action.test.js index 3c1ef94c..89f5dc34 100644 --- a/src/action.test.js +++ b/src/action.test.js @@ -128,9 +128,9 @@ describe('Commit Linter action', () => { await runAction() td.verify(core.setFailed(), { times: 0, ignoreExtraArgs: true }) + td.verify(console.log(contains('wrong message 1'))) + td.verify(console.log(contains('wrong message 2'))) td.verify(console.log(contains('Passing despite errors ✅'))) - td.verify(core.setOutput(contains('wrong message 1'))) - td.verify(core.setOutput(contains('wrong message 2'))) }) it('should pass for push range with correct messages with failOnErrors set to false', async () => {