Skip to content

Commit

Permalink
Additional flags for detect-secrets and reviewdog
Browse files Browse the repository at this point in the history
  • Loading branch information
levonet committed Mar 18, 2021
1 parent 5ca2695 commit 21b406f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 7 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ 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}" \
-filter-mode="${INPUT_FILTER_MODE:-added}" \
-reporter="${INPUT_REPORTER:-github-pr-check}" \
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \
-level="${INPUT_LEVEL}" \
${INPUT_REVIEWDOG_FLAGS}

0 comments on commit 21b406f

Please sign in to comment.