diff --git a/README.md b/README.md index 21603da..c9f2e20 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,15 @@ Reporter of reviewdog command [github-pr-check,github-pr-review,github-check]. Default is github-pr-check. github-pr-review can use Markdown and add a link to rule page in reviewdog reports. +### `reviewdog_flags` + +Optional. Additional reviewdog flags. + +### `detect_secrets_flags` + +Optional. Flags and args of detect-secrets command. +The default is `--all-files --force-use-all-plugins`. + ## Example usage ### [.github/workflows/reviewdog.yml](.github/workflows/reviewdog.yml) diff --git a/action.yml b/action.yml index d1b43af..93c0fba 100644 --- a/action.yml +++ b/action.yml @@ -24,7 +24,13 @@ inputs: Reporter of reviewdog command [github-pr-check,github-pr-review,github-check]. Default is github-pr-check. github-pr-review can use Markdown and add a link to rule page in reviewdog reports. - default: 'github-pr-check' + default: github-pr-check + reviewdog_flags: + description: Additional reviewdog flags + default: "" + detect_secrets_flags: + description: Flags and args of detect-secrets command. The default is '--all-files --force-use-all-plugins'. + default: --all-files --force-use-all-plugins runs: using: docker image: Dockerfile diff --git a/entrypoint.sh b/entrypoint.sh index a5a1473..e283fb1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,7 +6,7 @@ export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}" detect-secrets --version -detect-secrets scan --all-files --force-use-all-plugins \ +detect-secrets scan ${INPUT_DETECT_SECRETS_FLAGS} \ | baseline2rdf \ | reviewdog -f=rdjson \ -name="${INPUT_NAME:-detect-secrets}" \ @@ -14,3 +14,4 @@ detect-secrets scan --all-files --force-use-all-plugins \ -reporter="${INPUT_REPORTER:-github-pr-check}" \ -fail-on-error="${INPUT_FAIL_ON_ERROR}" \ -level="${INPUT_LEVEL}" \ + ${INPUT_REVIEWDOG_FLAGS}