mirror of
https://github.com/wagoid/commitlint-github-action.git
synced 2025-11-07 08:06:54 +00:00
fix(action): refactor a value, add to docs
This commit is contained in:
parent
2640e4c8bf
commit
7991e57b35
2 changed files with 13 additions and 3 deletions
12
README.md
12
README.md
|
|
@ -52,6 +52,18 @@ Whether you want to fail on warnings or not.
|
|||
|
||||
Default: `false`
|
||||
|
||||
### `failOnWarnings`
|
||||
|
||||
Whether you want to fail on warnings or not.
|
||||
|
||||
Default: `false`
|
||||
|
||||
### `failOnErrors`
|
||||
|
||||
Whether you want to fail on errors or not. Still outputs the results, just forces the action to pass even if errors are detected.
|
||||
|
||||
Default: `true`
|
||||
|
||||
### `helpURL`
|
||||
|
||||
Link to a page explaining your commit message convention.
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@ const { GITHUB_EVENT_NAME, GITHUB_SHA } = process.env
|
|||
|
||||
const configPath = resolve(process.env.GITHUB_WORKSPACE, getInput('configFile'))
|
||||
|
||||
const failOnErrors = getInput('failOnErrors')
|
||||
|
||||
const getCommitDepth = () => {
|
||||
const commitDepthString = getInput('commitDepth')
|
||||
if (!commitDepthString?.trim()) return null
|
||||
|
|
@ -147,7 +145,7 @@ const showLintResults = async ([from, to]) => {
|
|||
|
||||
if (hasOnlyWarnings(lintedCommits)) {
|
||||
handleOnlyWarnings(formattedResults)
|
||||
} else if (formattedResults && failOnErrors === 'false') {
|
||||
} else if (formattedResults && getInput('failOnErrors') === 'false') {
|
||||
// https://github.com/actions/toolkit/tree/master/packages/core#exit-codes
|
||||
// this would be a good place to implement the setNeutral() when it's eventually implimented.
|
||||
// for now it can pass with a check mark.
|
||||
|
|
|
|||
Loading…
Reference in a new issue