Skip to content

Commit 2fb2098

Browse files
committed
resuming tests for vale checks on PRs
1 parent a2dfecc commit 2fb2098

File tree

2 files changed

+46
-13
lines changed

2 files changed

+46
-13
lines changed

.github/workflows/vale-action.yml

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,51 @@
1-
name: Lint with Vale
2-
on: [pull_request]
1+
name: Vale Linting
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened] # Trigger on PR open, new commits, or reopening
36

47
jobs:
58
vale:
6-
name: Vale linter
9+
name: Lint documentation with Vale
710
runs-on: ubuntu-latest
11+
812
steps:
9-
- uses: actions/checkout@v3
10-
- uses: errata-ai/vale-action@reviewdog
13+
- name: Checkout code
14+
uses: actions/checkout@v4 # Recommended to use the latest version of checkout
15+
16+
# Optional: Install Asciidoctor if you're linting AsciiDoc files
17+
- name: Install Asciidoctor
18+
run: sudo apt-get install -y asciidoctor
19+
20+
- name: Run Vale with Reviewdog
21+
uses: errata-ai/vale-action@reviewdog # Use the 'reviewdog' branch for PR checks and comments
1122
with:
12-
filter_mode: added
13-
vale_flags: "--no-exit --minAlertLevel=error --glob=*.adoc"
14-
reporter: github-pr-review
15-
fail_on_error: false
16-
env:
17-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
18-
REVIEWDOG_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}}
23+
# Pin the Vale CLI version for consistent results.
24+
# Check https://github.com/errata-ai/vale-action for the latest recommended version.
25+
version: '3.11.2'
26+
27+
# Specifies where Vale will look for files to lint.
28+
# You can specify directories, specific files, or use 'all' for the whole repo.
29+
files: '["content", "modules"]'
30+
31+
# 'github-pr-check' creates a check that appears on the PR.
32+
# 'github-pr-review' creates review comments directly on the lines.
33+
# For detailed comments, 'github-pr-check' combined with 'reviewdog' is often best.
34+
reporter: 'github-pr-check'
35+
36+
# 'nofilter' reports errors for all files in the specified 'files' list,
37+
# not just the changes introduced in the PR. This is often desired for initial setup.
38+
# Other options: 'added' (default, only new/modified lines), 'diff_context', 'file'.
39+
filter_mode: 'added'
40+
41+
# If true, the action will fail if Vale reports any errors.
42+
# This will block PR merges if branch protection rules are set.
43+
fail_on_error: true
44+
45+
# Optional: Pass additional flags to the Vale CLI.
46+
# For example, to specify a custom config file:
47+
# vale_flags: '--config .vale/my-custom-config.ini'
48+
49+
# The GitHub token is usually automatically provided by GitHub Actions.
50+
# You typically don't need to explicitly set it unless you have very specific needs.
51+
# token: ${{ secrets.GITHUB_TOKEN }}

.vale.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ MinAlertLevel = suggestion
44

55
Packages = RedHat, AsciiDoc
66

7-
Vocab = ValidatedPatternsDocs
7+
#Vocab = ValidatedPatternsDocs
88

99
#IgnoredScopes = code, tt, img, url, a, body.id
1010

0 commit comments

Comments
 (0)