Skip to content

Commit

Permalink
[CI] Introduce GitHub checks based linting with reviewdog (#900)
Browse files Browse the repository at this point in the history
* [CI] Introduce linting for branch commits with reviewdog
This utilises the GitHub checks API and could be a potential candidate instead of in-line PR reviews.

* [CI] Change reporter to `github-check`

* [CI] Adjust linting in-line PR commentary to execute with linting step
  • Loading branch information
nightah committed Apr 22, 2020
1 parent 7e63439 commit 0ec3f18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .buildkite/hooks/post-command
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
set +u

if [[ $BUILDKITE_PULL_REQUEST != "false" ]]; then
if [[ $BUILDKITE_LABEL == ":hammer_and_wrench: Unit Test" ]]; then
echo "--- :go::service_dog: Linting pull request"
if [[ $BUILDKITE_LABEL == ":service_dog: Linting" ]]; then
echo "--- :go::service_dog: Provide in-line commentary for pull request"
reviewdog -reporter=github-pr-review
fi
fi
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ env:
CI_BYPASS: ${CI_BYPASS}
steps:
- label: ":service_dog: Linting"
command: "reviewdog -reporter=github-check"
if: build.branch !~ /^(master)|(v[0-9]+\.[0-9]+\.[0-9]+)$\$/ && build.env("CI_BYPASS") != "true"
- label: ":hammer_and_wrench: Unit Test"
command: "authelia-scripts --log-level debug ci"
if: build.branch !~ /^(master)|(v[0-9]+\.[0-9]+\.[0-9]+)$\$/ && build.env("CI_BYPASS") != "true"
Expand Down

0 comments on commit 0ec3f18

Please sign in to comment.