-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new reviewdog flags introduced by v0.10.0 (#8)
- Loading branch information
1 parent
ca19324
commit 2a56075
Showing
3 changed files
with
48 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,38 @@ | ||
name: 'Run yamllint with reviewdog' | ||
description: '🐶 Run yamllint with reviewdog on pull requests to improve code review experience.' | ||
author: 'aslafy-z' | ||
name: "Run yamllint with reviewdog" | ||
description: "🐶 Run yamllint with reviewdog on pull requests to improve code review experience." | ||
author: "aslafy-z" | ||
inputs: | ||
github_token: | ||
description: 'GITHUB_TOKEN.' | ||
default: '${{ github.token }}' | ||
description: "GITHUB_TOKEN." | ||
default: "${{ github.token }}" | ||
level: | ||
description: 'Report level for reviewdog [info,warning,error]' | ||
default: 'error' | ||
description: "Report level for reviewdog [info,warning,error]" | ||
default: "error" | ||
reporter: | ||
description: | | ||
Reporter of reviewdog command [github-pr-check,github-pr-review]. | ||
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" | ||
filter_mode: | ||
description: | | ||
Filtering mode for the reviewdog command [added,diff_context,file,nofilter]. | ||
Default is added. | ||
default: "added" | ||
fail_on_error: | ||
description: | | ||
Exit code for reviewdog when errors are found [true,false] | ||
Default is `false`. | ||
default: "false" | ||
reviewdog_flags: | ||
description: "Additional reviewdog flags" | ||
default: "" | ||
yamllint_flags: | ||
description: "flags and args of yamllint command. Default: '.'" | ||
default: '.' | ||
default: "." | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
using: "docker" | ||
image: "Dockerfile" | ||
branding: | ||
icon: 'alert-octagon' | ||
color: 'blue' | ||
icon: "alert-octagon" | ||
color: "blue" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
#!/bin/sh | ||
|
||
cd "$GITHUB_WORKSPACE" | ||
cd "$GITHUB_WORKSPACE" || exit | ||
|
||
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}" | ||
|
||
yamllint --version | ||
|
||
yamllint --format "parsable" ${INPUT_YAMLLINT_FLAGS:-'.'} \ | ||
| reviewdog -efm="%f:%l:%c: %m" -name "yamllint" -reporter="${INPUT_REPORTER:-github-pr-check}" -level="${INPUT_LEVEL}" | ||
| reviewdog \ | ||
-efm="%f:%l:%c: %m" \ | ||
-name "yamllint" \ | ||
-reporter="${INPUT_REPORTER:-github-pr-check}" \ | ||
-level="${INPUT_LEVEL}" \ | ||
-filter-mode="${INPUT_FILTER_MODE}" \ | ||
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \ | ||
${INPUT_REVIEWDOG_FLAGS} |