Skip to content

Commit

Permalink
fix: preview param
Browse files Browse the repository at this point in the history
  • Loading branch information
tsuyoshicho committed Aug 5, 2024
1 parent aa6f352 commit 13347da
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"
echo '::group:: Running textlint with reviewdog 🐶 ...'
textlint_exit_val="0"
reviewdog_exit_val="0"
# ignore preview exit code
reviewdog_exit_val2="0"

# shellcheck disable=SC2086
textlint_check_output=$(npx textlint -f checkstyle ${INPUT_TEXTLINT_FLAGS} 2>&1) \
Expand All @@ -69,15 +71,17 @@ if [[ "${INPUT_REPORTER}" == "github-pr-review" ]]; then

git stash -u

# shellcheck disable=SC2086
reviewdog \
-f=diff \
-f.diff.strip=1 \
-name="${INPUT_TOOL_NAME}-fix" \
-reporter="github-pr-review" \
-filter-mode="diff_context" \
-level="${INPUT_LEVEL}" \
${INPUT_REVIEWDOG_FLAGS} < "${TMPFILE}"
# shellcheck disable=SC2086,SC2034
reviewdog \
-f=diff \
-f.diff.strip=1 \
-name="${INPUT_TOOL_NAME}-fix" \
-reporter="github-pr-review" \
-filter-mode="${INPUT_FILTER_MODE}" \
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \
-level="${INPUT_LEVEL}" \
${INPUT_REVIEWDOG_FLAGS} < "${TMPFILE}" \
|| reviewdog_exit_val2="$?"

git stash drop || true
echo '::endgroup::'
Expand Down

0 comments on commit 13347da

Please sign in to comment.