From a80510e9099f5c237bd01d4d67a2c7adcea15764 Mon Sep 17 00:00:00 2001 From: Bilka Date: Thu, 19 Sep 2024 14:02:28 +0200 Subject: [PATCH] Replace deprecated fail-on-error flag with fail-level --- README.md | 6 +++--- action.yml | 10 ++++++---- script.sh | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a7dfee4..81b10a0 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,10 @@ code review experience. Optional. Report level for reviewdog [`info`, `warning`, `error`]. The default is `error`. -### `fail_on_error` +### `fail_level` -Optional. Exit code 1 for reviewdog if it finds errors [`true`, `false`]. -The 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`]. +The default is `none`. ### `reporter` diff --git a/action.yml b/action.yml index e063192..a896c64 100644 --- a/action.yml +++ b/action.yml @@ -8,9 +8,11 @@ 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' + fail_level: + description: | + 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' reporter: description: | Reporter of reviewdog command [github-pr-check,github-check,github-pr-review]. @@ -32,7 +34,7 @@ runs: env: INPUT_GITHUB_TOKEN: ${{ inputs.github_token }} INPUT_LEVEL: ${{ inputs.level }} - INPUT_FAIL_ON_ERROR: ${{ inputs.fail_on_error }} + INPUT_FAIL_LEVEL: ${{ inputs.fail_level }} INPUT_REPORTER: ${{ inputs.reporter }} INPUT_FILTER_MODE: ${{ inputs.filter_mode }} INPUT_USE_BUNDLER: ${{ inputs.use_bundler }} diff --git a/script.sh b/script.sh index 1315cc2..f1c222c 100755 --- a/script.sh +++ b/script.sh @@ -27,5 +27,5 @@ ${BUNDLE_EXEC}erblint --lint-all --format compact \ -reporter="${INPUT_REPORTER}" \ -filter-mode="${INPUT_FILTER_MODE}" \ -level="${INPUT_LEVEL}" \ - -fail-on-error="${INPUT_FAIL_ON_ERROR}" + -fail-level="${INPUT_FAIL_LEVEL}" echo '::endgroup::'