Skip to content

Commit

Permalink
Merge branch 'test-vale' into test-vale-pr
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Jun 14, 2024
2 parents 4738fb0 + 8d7b875 commit 9d805af
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 38 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -1,36 +0,0 @@
name: Reviewdog suggester

on:
pull_request:
paths:
- '**/*.md'

jobs:
suggest:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Download Vale results
uses: actions/download-artifact@v3
with:
name: vale-results

- name: Run Reviewdog Suggestion Action
uses: reviewdog/action-suggester@v1
with:
github_token: ${{ secrets.REVIEWDOG_GITHUB_API_TOKEN }}
tool_name: Vale
level: "warning"
filter_mode: "diff_context"
fail_on_error: "false"
reviewdog_flags: ""
cleanup: "true"

- name: Run Reviewdog with Vale results
run: |
reviewdog -f=rdjsonl -name="Vale" -reporter=github-pr-review -level=warning -filter-mode=nofilter < rdjson_output.jsonl
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.REVIEWDOG_GITHUB_API_TOKEN }}
34 changes: 32 additions & 2 deletions .github/workflows/vale.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Vale Lint
name: Lint and Suggest

on:
pull_request:
paths:
- '**/*.md'

jobs:
vale:
vale: # Vale linting job
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -49,3 +49,33 @@ jobs:
with:
name: vale-results
path: rdjson_output.jsonl

suggest: # Reviewdog suggestion job
runs-on: ubuntu-latest
needs: vale # This ensures the suggest job runs after the vale job

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Download Vale results
uses: actions/download-artifact@v3
with:
name: vale-results

- name: Run Reviewdog Suggestion Action
uses: reviewdog/action-suggester@v1
with:
github_token: ${{ secrets.REVIEWDOG_GITHUB_API_TOKEN }}
tool_name: Vale
level: "warning"
filter_mode: "diff_context"
fail_on_error: "false"
reviewdog_flags: ""
cleanup: "true"

- name: Run Reviewdog with Vale results
run: |
reviewdog -f=rdjsonl -name="Vale" -reporter=github-pr-review -level=warning -filter-mode=nofilter < rdjson_output.jsonl
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.REVIEWDOG_GITHUB_API_TOKEN }}

0 comments on commit 9d805af

Please sign in to comment.