-
Notifications
You must be signed in to change notification settings - Fork 32
chore(docs): add Vale grammar/style checker in CI #362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@tapchan54 is attempting to deploy a commit to the Marketing at Plane Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThis PR introduces Vale documentation linting configuration. It adds a GitHub Actions workflow that automatically runs Vale on pull requests affecting Markdown or documentation files, along with a configuration file specifying linting rules and style paths for Markdown documents. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.vale.ini (1)
1-2: Verify StylesPath matches workflow and confirm MinAlertLevel scope.Line 1 sets
StylesPath = ./.vale/styles, which should match where the workflow clones styles (./.vale/stylesin line 20 of vale.yml). Confirm this is intentional. Additionally,MinAlertLevel = suggestionis very permissive—all Vale suggestions will trigger warnings. Consider whether this should be raised towarningorerrorto enforce more substantive style violations..github/workflows/vale.yml (2)
3-8: Clarify trigger scope for.github/**path.The workflow triggers on
.github/**, which includes this workflow file itself. Depending on your merge strategy, this could create unnecessary workflow runs on CI-related changes. Consider whether.github/**should be scoped more narrowly to documentation-related workflows (e.g.,.github/workflows/docs/**or removed if not needed).
18-20: Add error handling for style cloning and consider caching.The
git clonecommand has no error handling—if the clone fails silently or times out, Vale will run with missing styles and produce misleading results. Additionally, styles are re-cloned on every workflow run, adding latency. Consider:
- Adding
set -eor explicit error checking to fail fast if styles fail to clone.- Caching the cloned styles directory using GitHub Actions caching to reduce CI latency.
Here's a suggested improvement with error handling and caching:
- - name: Fetch Vale styles - run: | - git clone https://github.com/errata-ai/styles.git ./.vale/styles + - name: Cache Vale styles + uses: actions/cache@v4 + with: + path: ./.vale/styles + key: vale-styles-${{ hashFiles('.vale.ini') }} + restore-keys: vale-styles- + + - name: Fetch Vale styles + run: | + if [ ! -d "./.vale/styles" ]; then + git clone https://github.com/errata-ai/styles.git ./.vale/styles || { echo "Failed to clone styles"; exit 1; } + fi
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/vale.yml(1 hunks).vale.ini(1 hunks)
🔇 Additional comments (1)
.github/workflows/vale.yml (1)
22-26: Verify Vale action version and parameter alignment with configuration.The workflow uses
errata-ai/vale-action@v2and passesstylesPath: ./.vale/stylesexplicitly. Confirm that:
- Version
@v2is the appropriate/latest stable version for your use case.- The
stylesPathparameter in the action matches theStylesPathsetting in.vale.ini(line 1).Both currently reference
./.vale/styles, which appears consistent, but verify the action respects theconfigparameter correctly when astylesPathis also provided.
Adds a GitHub Actions workflow that runs Vale (https://vale.sh) to check grammar and style on Markdown documentation.
This helps keep Plane’s documentation consistent and grammatically correct.
Summary by CodeRabbit