-
Notifications
You must be signed in to change notification settings - Fork 377
Changed Vale and markdownlint worklows to run on just the changed lines #5830
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?
Changed Vale and markdownlint worklows to run on just the changed lines #5830
Conversation
|
Warning Rate limit exceeded@himeshsiriwardana has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 17 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
WalkthroughGitHub Actions workflows were restructured: markdownlint and Vale now run via Reviewdog on changed Markdown files, include explicit install steps and use a space-separated changed-files output; CI step gating and env handling were adjusted. A docs guide on SMS OTP was expanded with prerequisites and setup details. Changes
sequenceDiagram
participant Runner as GitHub Actions Runner
participant Checkout as actions/checkout
participant Changed as tj-actions/changed-files
participant Installer as shell (installers)
participant Linter as markdownlint / Vale
participant Reviewdog as reviewdog/action
participant GitHub as GitHub PR API
Runner->>Checkout: clone repo
Runner->>Changed: list changed `**/*.md` (space-separated)
alt install needed
Runner->>Installer: install linter(s) & reviewdog
end
Runner->>Linter: run on changed files
Linter->>Reviewdog: pipe results (diff filter)
Reviewdog->>GitHub: post review (github-pr-review) and set fail_on_error
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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: 2
🤖 Fix all issues with AI agents
In @.github/workflows/markdownlint.yml:
- Around line 16-30: The changed-files step is emitting comma-separated paths
which reviewdog expects as newline-separated; update the
tj-actions/changed-files step (uses: tj-actions/changed-files@v46, id:
changed-files) to set separator: "\n" so that
steps.changed-files.outputs.all_changed_files produces newline-separated file
paths consumed by the reviewdog/action-markdownlint step (paths: ${{
steps.changed-files.outputs.all_changed_files }}).
In @.github/workflows/style-checker.yml:
- Around line 23-27: The workflow references the mutable branch tag
"errata-ai/vale-action@reviewdog"; pin the action to the stable release by
replacing that with the specific version tag (for example
"errata-ai/vale-action@v2.1.1") in the step that currently reads uses:
errata-ai/vale-action@reviewdog so the action is reproducible and secure.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/markdownlint.yml.github/workflows/style-checker.yml
🔇 Additional comments (2)
.github/workflows/markdownlint.yml (2)
12-14: LGTM!Using
fetch-depth: 0is correct for enabling proper diff detection between the PR branch and base branch.
22-23: Good use of conditional execution.The
ifcondition properly guards against running the linter when no markdown files have changed, avoiding unnecessary workflow failures.
.github/workflows/markdownlint.yml
Outdated
| - uses: tj-actions/changed-files@v46 | ||
| id: changed-files | ||
| with: | ||
| files: '**/*.md' | ||
| separator: "," | ||
|
|
||
| - name: Markdownlint via reviewdog | ||
| if: steps.changed-files.outputs.any_changed == 'true' | ||
| uses: reviewdog/action-markdownlint@v1 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| reporter: github-pr-check | ||
| filter_mode: diff | ||
| fail_on_error: true | ||
| paths: ${{ steps.changed-files.outputs.all_changed_files }} |
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.
🧩 Analysis chain
🌐 Web query:
reviewdog/action-markdownlint paths parameter documentation
💡 Result:
Do you mean the GitHub Actions workflow trigger "paths" (on: push / pull_request paths) or an input named "paths" on the reviewdog/action-markdownlint GitHub Action?
🌐 Web query:
site:github.com reviewdog/action-markdownlint action.yml paths input
💡 Result:
I searched GitHub for reviewdog/action-markdownlint and didn't find a repository or an action.yml for that name. I did find many reviewdog actions (e.g., action-eslint, action-shellcheck, action-actionlint) and separate markdownlint actions (markdownlint-cli / actionshub/markdownlint). See examples: [1][2][3].
If you want, tell me whether you meant:
- a reviewdog-provided action for markdownlint (which doesn't appear to exist), or
- a standalone markdownlint GitHub Action (e.g., markdownlint-cli), and I’ll fetch that action.yml and check for a "paths" / "paths"‑style input.
Sources:
[1] reviewdog/action-eslint (example reviewdog action).
[2] reviewdog/action-shellcheck (example reviewdog action).
[3] actionshub/markdownlint / markdownlint-cli (markdownlint actions on GitHub).
🌐 Web query:
site:github.com reviewdog/action-markdownlint
💡 Result:
I couldn't find an active GitHub repository named reviewdog/action-markdownlint. I did find:
- A package/registry entry for reviewdog/action-markdownlint (package listing, last release >1 year ago). [1]
- The reviewdog organization hosts many other action-* repos (e.g., action-remark-lint) and the main reviewdog project. [2][3]
- Note: several reviewdog actions were reported compromised in March 2025 (affecting reviewdog/action-setup and actions that used it). Consider this if you planned to use any reviewdog actions. [4]
Sources:
- Package usage listing for reviewdog/action-markdownlint. [1]
- reviewdog organization / reviewdog repo. [2]
- reviewdog/action-remark-lint (example reviewdog action). [3]
- GitHub Advisory / incident report for compromised reviewdog actions (Mar 2025). [4]
🏁 Script executed:
cat -n .github/workflows/markdownlint.ymlRepository: wso2/docs-is
Length of output: 986
🌐 Web query:
reviewdog/action-markdownlint v1 action.yml github
💡 Result:
I couldn't find a repository named reviewdog/action-markdownlint or an action.yml for that exact repo/tag on GitHub. The reviewdog org has many action templates (e.g., action-template) and other linter actions, but no action-markdownlint repository appears to exist. [1][2]
If you meant a general Markdown linter action, the GitHub Marketplace recommends alternatives (e.g., DavidAnson/markdownlint-cli2-action or GitHub Super-Linter). [3]
References
- reviewdog organization / action templates and actions. [1]
- reviewdog main repo (reviewdog CLI + actions info). [2]
- GitHub Marketplace — markdown-lint / alternatives. [3]
If you want, I can:
- search for a specific fork/third-party repo named action-markdownlint, or
- show how to create a reviewdog-based markdownlint action (example action.yml). Which would you prefer?
🏁 Script executed:
# Search for any GitHub issues or documentation mentioning the markdownlint action
rg -i "markdownlint" --type md --type yml .github/Repository: wso2/docs-is
Length of output: 83
🏁 Script executed:
# Check if there are any recent commits or issues related to this workflow
git log --oneline -20 -- .github/workflows/markdownlint.ymlRepository: wso2/docs-is
Length of output: 137
🏁 Script executed:
# Check the recent commit to see what changed
git show 84232c95c -- .github/workflows/markdownlint.ymlRepository: wso2/docs-is
Length of output: 1227
🏁 Script executed:
# Search for any mention of action-markdownlint in the entire repo
rg "action-markdownlint" .Repository: wso2/docs-is
Length of output: 38
🏁 Script executed:
# Search for any documentation about this workflow
find . -name "README*" -o -name "WORKFLOW*" | head -10Repository: wso2/docs-is
Length of output: 103
🌐 Web query:
"reviewdog/action-markdownlint" separator paths format github issues
💡 Result:
Short answer: when an action accepts a "paths" (or "globs") input that is a single string list, provide entries separated by newlines by default; if the action exposes a "separator" input you can change that (e.g., to a comma) and pass a single-line, separator‑joined string. Use quoting / multiline YAML scalar so GitHub Actions preserves newlines.
Examples / references:
- markdownlint-cli2-action: globs default to newline-separated; has a separator input (defaults to \n) so you can pass globs: 'a.md,b.md' with separator: ','. [1]
- reviewdog-style actions commonly accept a single-string paths input (newline‑separated) — see detect-secrets and other reviewdog actions that document a paths/workdir input and examples using a single string. Quote/multiline where shown. [2][3]
If you want, paste the exact action.yml or your workflow snippet and I’ll show the exact YAML you should use.
Sources:
- DavidAnson/markdownlint-cli2-action (separator / globs docs). [1]
- reviewdog/action-detect-secrets (paths/workdir input examples). [2]
- example gist & reviewdog action examples demonstrating newline/multiline inputs. [3]
🌐 Web query:
"reviewdog/action-markdownlint" comma separated paths
💡 Result:
Short answer: reviewdog actions expect path/glob inputs as newline-separated lines (not comma-separated). Use newlines or convert commas to newlines (e.g. with bash parameter expansion or yq). Example:
with:
path: |
docs
README.md
subdir/*.md
If you have a comma list, convert it before passing (example in a run step):
- run: echo "${{ inputs.PATHS//,/\n }}" > paths.txt
Sources: reviewdog action input docs (examples show newline-separated path/glob inputs) and markdownlint/action pattern docs. [1][2]
References
[1] reviewdog action-shellcheck inputs (path: directories are separated by lines). [turn0search2]
[2] markdownlint-cli2-action (globs are newline-delimited). [turn0search6]
Separator mismatch: paths expects newline-separated values, not comma-separated.
The tj-actions/changed-files step outputs comma-separated paths, but reviewdog/action-markdownlint expects newline-separated file paths. Change the separator to "\n":
🔧 Proposed fix
- uses: tj-actions/changed-files@v46
id: changed-files
with:
files: '**/*.md'
- separator: ","
+ separator: "\n"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - uses: tj-actions/changed-files@v46 | |
| id: changed-files | |
| with: | |
| files: '**/*.md' | |
| separator: "," | |
| - name: Markdownlint via reviewdog | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| uses: reviewdog/action-markdownlint@v1 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| reporter: github-pr-check | |
| filter_mode: diff | |
| fail_on_error: true | |
| paths: ${{ steps.changed-files.outputs.all_changed_files }} | |
| - uses: tj-actions/changed-files@v46 | |
| id: changed-files | |
| with: | |
| files: '**/*.md' | |
| separator: "\n" | |
| - name: Markdownlint via reviewdog | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| uses: reviewdog/action-markdownlint@v1 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| reporter: github-pr-check | |
| filter_mode: diff | |
| fail_on_error: true | |
| paths: ${{ steps.changed-files.outputs.all_changed_files }} |
🤖 Prompt for AI Agents
In @.github/workflows/markdownlint.yml around lines 16 - 30, The changed-files
step is emitting comma-separated paths which reviewdog expects as
newline-separated; update the tj-actions/changed-files step (uses:
tj-actions/changed-files@v46, id: changed-files) to set separator: "\n" so that
steps.changed-files.outputs.all_changed_files produces newline-separated file
paths consumed by the reviewdog/action-markdownlint step (paths: ${{
steps.changed-files.outputs.all_changed_files }}).
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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
en/includes/guides/authentication/passwordless-login/add-passwordless-login-with-sms-otp.md (1)
16-16: Fix article-noun agreement.The line uses "an mobile" but should use "a mobile" since "mobile" starts with a consonant sound.
📝 Proposed fix
-- [Update the user profile of the users]({{base_path}}/guides/users/manage-users/#update-the-profile) with an mobile number to which the user will receive the OTP. +- [Update the user profile of the users]({{base_path}}/guides/users/manage-users/#update-the-profile) with a mobile number to which the user will receive the OTP.
🧹 Nitpick comments (1)
en/includes/guides/authentication/passwordless-login/add-passwordless-login-with-sms-otp.md (1)
4-4: Good improvement to clarity and conciseness.The rewrite successfully converts passive voice to active voice, making the description more direct and easier to understand.
Optional: Minor refinement for grammatical precision
If you want to be more grammatically precise, consider making "authentication method" or similar the subject:
-SMS OTP (One-Time Password) sends a password valid for a short duration to the user's registered mobile number. The user must enter the password to log in. +SMS OTP (One-Time Password) is an authentication method that sends a password valid for a short duration to the user's registered mobile number. The user must enter the password to log in.However, the current wording is acceptable and commonly used in technical documentation.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
en/includes/guides/authentication/passwordless-login/add-passwordless-login-with-sms-otp.md
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: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
en/includes/guides/authentication/passwordless-login/add-passwordless-login-with-sms-otp.md (1)
14-14: Grammar error: incorrect article."an mobile number" should be "a mobile number" (use "a" before consonant sounds).
📝 Proposed fix
-- [Update the user profile of the users]({{base_path}}/guides/users/manage-users/#update-the-profile) with an mobile number to which the user will receive the OTP. +- [Update the user profile of the users]({{base_path}}/guides/users/manage-users/#update-the-profile) with a mobile number to which the user will receive the OTP.
🤖 Fix all issues with AI agents
In @.github/workflows/markdownlint.yml:
- Around line 31-38: The workflow step "Run Markdownlint on changed files" calls
reviewdog but never installs it and uses "npx markdownlint-cli" unnecessarily;
add an explicit step before that (named like "Install reviewdog") that installs
reviewdog into the PATH (matching how style-checker.yml does it), and change the
run command in "Run Markdownlint on changed files" to invoke markdownlint
directly (e.g., "markdownlint ${{ steps.changed-files.outputs.all_changed_files
}}") instead of "npx markdownlint-cli ...", keeping the reviewdog invocation the
same.
In @.github/workflows/style-checker.yml:
- Around line 27-31: Update the "Install Vale" step in
.github/workflows/style-checker.yml to fetch and install the current Vale
release instead of v2.26.3: change the download URL and archive name used in the
curl command to the latest release (e.g., v3.13.0 and
Vale-3.13.0-linux-amd64.tar.gz) in the step named "Install Vale", and ensure the
subsequent move of the extracted binary to /usr/local/bin/vale still matches the
archive contents; optionally update any checksums or version references
elsewhere in the workflow to reflect the new version.
🧹 Nitpick comments (1)
.github/workflows/style-checker.yml (1)
33-36: Pin Reviewdog to a specific version for reproducibility and security.The installer script is fetched from the
masterbranch, which could change unexpectedly and introduces a supply-chain risk. Pin to the latest stable release (v0.21.0) instead.♻️ Suggested improvement
# Step 4: Install Reviewdog - name: Install Reviewdog run: | - curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b /usr/local/bin + curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/v0.21.0/install.sh | sh -s -- -b /usr/local/bin v0.21.0
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/markdownlint.yml.github/workflows/style-checker.ymlen/includes/guides/authentication/passwordless-login/add-passwordless-login-with-sms-otp.md
🔇 Additional comments (2)
.github/workflows/style-checker.yml (1)
38-45: LGTM!The Vale execution step is well-structured: it correctly gates on
any_changed, pipes output to reviewdog with appropriate flags (-filter-mode=diffensures only changed lines are reviewed), and properly passesGITHUB_TOKEN.en/includes/guides/authentication/passwordless-login/add-passwordless-login-with-sms-otp.md (1)
4-6: LGTM!The documentation is well-structured with clear prerequisites, setup instructions, and a comprehensive settings table. The content accurately describes the SMS OTP passwordless login flow.
Also applies to: 20-53
| # Step 4: Run Markdownlint via Reviewdog | ||
| - name: Run Markdownlint on changed files | ||
| if: steps.changed-files.outputs.any_changed == 'true' | ||
| run: | | ||
| npx markdownlint-cli ${{ steps.changed-files.outputs.all_changed_files }} | \ | ||
| reviewdog -f=markdownlint -name=markdownlint -reporter=github-pr-review -filter-mode=diff -fail-on-error | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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.
Missing Reviewdog installation causes workflow failure.
The workflow invokes reviewdog but no step installs it. Unlike style-checker.yml, this workflow is missing the Reviewdog installation step. The workflow will fail with reviewdog: command not found.
Also, since markdownlint-cli is installed globally in Step 3, npx is unnecessary—you can invoke markdownlint directly.
🔧 Proposed fix
Add a Reviewdog installation step and simplify the markdownlint invocation:
# Step 3: Install markdownlint-cli
- name: Install markdownlint-cli
run: npm install -g markdownlint-cli
+ # Step 4: Install Reviewdog
+ - name: Install Reviewdog
+ run: |
+ curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b /usr/local/bin
+
- # Step 4: Run Markdownlint via Reviewdog
+ # Step 5: Run Markdownlint via Reviewdog
- name: Run Markdownlint on changed files
if: steps.changed-files.outputs.any_changed == 'true'
run: |
- npx markdownlint-cli ${{ steps.changed-files.outputs.all_changed_files }} | \
+ markdownlint ${{ steps.changed-files.outputs.all_changed_files }} | \
reviewdog -f=markdownlint -name=markdownlint -reporter=github-pr-review -filter-mode=diff -fail-on-error
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Step 4: Run Markdownlint via Reviewdog | |
| - name: Run Markdownlint on changed files | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| run: | | |
| npx markdownlint-cli ${{ steps.changed-files.outputs.all_changed_files }} | \ | |
| reviewdog -f=markdownlint -name=markdownlint -reporter=github-pr-review -filter-mode=diff -fail-on-error | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Step 3: Install markdownlint-cli | |
| - name: Install markdownlint-cli | |
| run: npm install -g markdownlint-cli | |
| # Step 4: Install Reviewdog | |
| - name: Install Reviewdog | |
| run: | | |
| curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b /usr/local/bin | |
| # Step 5: Run Markdownlint via Reviewdog | |
| - name: Run Markdownlint on changed files | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| run: | | |
| markdownlint ${{ steps.changed-files.outputs.all_changed_files }} | \ | |
| reviewdog -f=markdownlint -name=markdownlint -reporter=github-pr-review -filter-mode=diff -fail-on-error | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
🤖 Prompt for AI Agents
In @.github/workflows/markdownlint.yml around lines 31 - 38, The workflow step
"Run Markdownlint on changed files" calls reviewdog but never installs it and
uses "npx markdownlint-cli" unnecessarily; add an explicit step before that
(named like "Install reviewdog") that installs reviewdog into the PATH (matching
how style-checker.yml does it), and change the run command in "Run Markdownlint
on changed files" to invoke markdownlint directly (e.g., "markdownlint ${{
steps.changed-files.outputs.all_changed_files }}") instead of "npx
markdownlint-cli ...", keeping the reviewdog invocation the same.
.github/workflows/style-checker.yml
Outdated
| # Step 3: Install Vale | ||
| - name: Install Vale | ||
| run: | | ||
| curl -L https://github.com/errata-ai/vale/releases/download/v2.26.3/Vale-2.26.3-linux-amd64.tar.gz | tar xz | ||
| sudo mv Vale /usr/local/bin/vale |
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.
🧩 Analysis chain
🌐 Web query:
Vale linter latest version release 2024 2025
💡 Result:
Latest Vale release: v3.13.0 (released Oct 22, 2025). Source: GitHub releases. [1]
Notable 2024–2025 releases:
- v3.10.0 — Mar 18, 2024. [1]
- v3.11.2 — Apr 7, 2025. [1]
- v3.12.0 — Jun 9, 2025. [1]
Source:
[1] errata-ai/vale — Releases (GitHub).
Update Vale to the latest version.
The workflow pins Vale to v2.26.3, which is significantly outdated. The latest release is v3.13.0 (Oct 2025), with multiple releases in between (v3.10.0, v3.11.2, v3.12.0) that include improvements and security updates. Update to v3.13.0 or the latest available version.
🤖 Prompt for AI Agents
In @.github/workflows/style-checker.yml around lines 27 - 31, Update the
"Install Vale" step in .github/workflows/style-checker.yml to fetch and install
the current Vale release instead of v2.26.3: change the download URL and archive
name used in the curl command to the latest release (e.g., v3.13.0 and
Vale-3.13.0-linux-amd64.tar.gz) in the step named "Install Vale", and ensure the
subsequent move of the extracted binary to /usr/local/bin/vale still matches the
archive contents; optionally update any checksums or version references
elsewhere in the workflow to reflect the new version.
Purpose
$subject
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.