mirror of
https://github.com/wagoid/commitlint-github-action.git
synced 2025-11-07 16:06:56 +00:00
fix(action): removed unnecessary setOutput call
This commit is contained in:
parent
097b726807
commit
0a35ed499e
2 changed files with 4 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
import { existsSync } from 'fs'
|
import { existsSync } from 'fs'
|
||||||
import { resolve } from 'path'
|
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 { context as eventContext, getOctokit } from '@actions/github'
|
||||||
import lint from '@commitlint/lint'
|
import lint from '@commitlint/lint'
|
||||||
import { format } from '@commitlint/format'
|
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.
|
// this would be a good place to implement the setNeutral() when it's eventually implimented.
|
||||||
// for now it can pass with a check mark.
|
// for now it can pass with a check mark.
|
||||||
console.log('Passing despite errors ✅')
|
console.log('Passing despite errors ✅')
|
||||||
setOutput(`You have commit messages with errors\n\n${formattedResults}`)
|
console.log(formattedResults)
|
||||||
} else if (formattedResults) {
|
} else if (formattedResults) {
|
||||||
setFailedAction(formattedResults)
|
setFailedAction(formattedResults)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -128,9 +128,9 @@ describe('Commit Linter action', () => {
|
||||||
await runAction()
|
await runAction()
|
||||||
|
|
||||||
td.verify(core.setFailed(), { times: 0, ignoreExtraArgs: true })
|
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(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 () => {
|
it('should pass for push range with correct messages with failOnErrors set to false', async () => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue