Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added input for fail-level reviewdog flag to later replace deprecated fail-on-error reviewdog flag #124

Merged
merged 3 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ With `reporter: github-pr-review` a comment is added to the Pull Request Convers

<!-- Please maintain inputs in alphabetical order -->

### `fail_on_error`
### `fail_level`

Optional. Exit code for reviewdog when errors are found [`true`, `false`].
Default is `false`.
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`].
Bilka2 marked this conversation as resolved.
Show resolved Hide resolved
Default is `none`.

### `filter_mode`

Expand Down
10 changes: 5 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ description: '🐶 Run rubocop with reviewdog on pull requests to improve code r
author: 'mgrachev (reviewdog)'
inputs:
# Please maintain inputs in alphabetical order
fail_on_error:
fail_level:
description: |
Exit code for reviewdog when errors are found [true,false]
Default is `false`.
default: 'false'
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].
Bilka2 marked this conversation as resolved.
Show resolved Hide resolved
Default is `none`.
default: 'none'
filter_mode:
description: |
Filtering mode for the reviewdog command [added,diff_context,file,nofilter].
Expand Down Expand Up @@ -63,7 +63,7 @@ runs:
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
# Please maintain inputs in alphabetical order
INPUT_FAIL_ON_ERROR: ${{ inputs.fail_on_error }}
INPUT_FAIL_LEVEL: ${{ inputs.fail_level }}
INPUT_FILTER_MODE: ${{ inputs.filter_mode }}
INPUT_GITHUB_TOKEN: ${{ inputs.github_token }}
INPUT_LEVEL: ${{ inputs.level }}
Expand Down
2 changes: 1 addition & 1 deletion script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ ${BUNDLE_EXEC}rubocop \
-name="${INPUT_TOOL_NAME}" \
-reporter="${INPUT_REPORTER}" \
-filter-mode="${INPUT_FILTER_MODE}" \
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \
-fail-level="${INPUT_FAIL_LEVEL}" \
-level="${INPUT_LEVEL}" \
${INPUT_REVIEWDOG_FLAGS}

Expand Down