Skip to content

Commit

Permalink
Restore fail-on-error flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilka2 committed Oct 12, 2024
1 parent b1ec222 commit a232c0d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ With `reporter: github-pr-review` a comment is added to the Pull Request Convers
Optional. Exit code 1 for reviewdog if it finds at least 1 issue with severity greater than or equal to the given level [`none`, `any`, `info`, `warning`, `error`].
Default is `none`.

### `fail_on_error`

Optional. Exit code for reviewdog when errors are found [`true`, `false`].
Default is `false`.

### `filter_mode`

Optional. Filtering mode for the reviewdog command [`added`, `diff_context`, `file`, `nofilter`].
Expand Down
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ inputs:
Exit code 1 for reviewdog if it finds at least 1 issue with severity greater than or equal to the given level [none,any,info,warning,error].
Default is `none`.
default: 'none'
fail_on_error:
description: |
Exit code for reviewdog when errors are found [true,false]
Default is `false`.
default: 'false'
filter_mode:
description: |
Filtering mode for the reviewdog command [added,diff_context,file,nofilter].
Expand Down Expand Up @@ -64,6 +69,7 @@ runs:
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
# Please maintain inputs in alphabetical order
INPUT_FAIL_LEVEL: ${{ inputs.fail_level }}
INPUT_FAIL_ON_ERROR: ${{ inputs.fail_on_error }}
INPUT_FILTER_MODE: ${{ inputs.filter_mode }}
INPUT_GITHUB_TOKEN: ${{ inputs.github_token }}
INPUT_LEVEL: ${{ inputs.level }}
Expand Down
1 change: 1 addition & 0 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ ${BUNDLE_EXEC}rubocop \
-reporter="${INPUT_REPORTER}" \
-filter-mode="${INPUT_FILTER_MODE}" \
-fail-level="${INPUT_FAIL_LEVEL}" \
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \
-level="${INPUT_LEVEL}" \
${INPUT_REVIEWDOG_FLAGS}

Expand Down

0 comments on commit a232c0d

Please sign in to comment.