From 79437a5f4618c447e00addeb4a94011f97aeb266 Mon Sep 17 00:00:00 2001 From: Daniele Pini Date: Thu, 15 Jun 2023 13:31:16 +0200 Subject: [PATCH] Fix --level reviewdog option when fail_on_error is false --- lib/main.js | 2 +- src/main.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/main.js b/lib/main.js index 6edff8c4..5bcc86b1 100644 --- a/lib/main.js +++ b/lib/main.js @@ -60,7 +60,7 @@ function run(actionInput) { `-reporter=${core.getInput('reporter')}`, `-fail-on-error=${should_fail}`, `-filter-mode=${core.getInput('filter_mode')}`, - `-level=${vale_code == 1 && should_fail ? 'error' : 'info'}` + `-level=${vale_code == 1 && should_fail === 'true' ? 'error' : 'info'}` ], { cwd, input: Buffer.from(output.stdout, 'utf-8'), diff --git a/src/main.ts b/src/main.ts index 5ecea802..0646fea4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -46,7 +46,9 @@ export async function run(actionInput: input.Input): Promise { `-reporter=${core.getInput('reporter')}`, `-fail-on-error=${should_fail}`, `-filter-mode=${core.getInput('filter_mode')}`, - `-level=${vale_code == 1 && should_fail ? 'error' : 'info'}` + `-level=${ + vale_code == 1 && should_fail === 'true' ? 'error' : 'info' + }` ], { cwd,