Skip to content

Commit

Permalink
Merge pull request #1 from Bilka2/add-fail-on-error
Browse files Browse the repository at this point in the history
Add fail-on-error input
  • Loading branch information
tk0miya authored Jul 20, 2024
2 parents 667687e + e3ebc11 commit eda368e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ code review experience.
Optional. Report level for reviewdog [`info`, `warning`, `error`].
The default is `error`.

### `fail_on_error`

Optional. Exit code 1 for reviewdog if it finds errors [`true`, `false`].
The default is `false`.

### `reporter`

Optional. Reporter of reviewdog command [`github-pr-check`, `github-check`, `github-pr-review`].
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ inputs:
level:
description: 'Report level for reviewdog [info,warning,error]'
default: 'error'
fail_on_error:
description: 'Exit code 1 for reviewdog if it finds errors [true,false]'
default: 'false'
reporter:
description: |
Reporter of reviewdog command [github-pr-check,github-check,github-pr-review].
Expand All @@ -29,6 +32,7 @@ runs:
env:
INPUT_GITHUB_TOKEN: ${{ inputs.github_token }}
INPUT_LEVEL: ${{ inputs.level }}
INPUT_FAIL_ON_ERROR: ${{ inputs.fail_on_error }}
INPUT_REPORTER: ${{ inputs.reporter }}
INPUT_FILTER_MODE: ${{ inputs.filter_mode }}
INPUT_USE_BUNDLER: ${{ inputs.use_bundler }}
Expand Down
3 changes: 2 additions & 1 deletion script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ ${BUNDLE_EXEC}erblint --lint-all --format compact \
-efm="%f:%l:%c: %m" \
-reporter="${INPUT_REPORTER}" \
-filter-mode="${INPUT_FILTER_MODE}" \
-level="${INPUT_LEVEL}"
-level="${INPUT_LEVEL}" \
-fail-on-error="${INPUT_FAIL_ON_ERROR}"
echo '::endgroup::'

0 comments on commit eda368e

Please sign in to comment.