Skip to content

⛔️ DEPRECATED ~~ GitHub action lint with Vale ✅❎ ~~ DEPRECATED ⛔️

Notifications You must be signed in to change notification settings

gaurav-nelson/github-action-vale-lint

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

No Maintenance Intended

DEPRECATED ⛔️

Use the official Vale action available at https://github.com/errata-ai/vale-action

Github action: Lint with Vale ✅❎

Automatically lint all modified text files in your GitHub pull requests. This GitHub action uses Vale to lint prose.

Lint with Vale

The github-action-vale-lint checks all modified text (including markup) files and reports failure on error.

Vale error list

Prerequisite

You must have Vale configuration file .vale.ini in your repository.

How to use

  1. Create a new file in your repository .github/workflows/action.yml.

    touch .github/workflows/pull_request.yml
  2. Copy-paste the folloing workflow in your pull_request.yml file:

    name: Lint PRs with Vale
    on: pull_request
    jobs:
      vale-lint-PR:
        runs-on: ubuntu-latest
        steps:
        - uses: actions/checkout@master
          with:
            fetch-depth: 1
        - uses: gaurav-nelson/github-action-vale-lint@v0.1.0
          env:
            GH_COMMENT_TOKEN: ${{ secrets.GH_COMMENT_TOKEN }}
  3. Or, if you want to lint all files (or files in a specific folder) and not just modified files, use the following workflow in your pull_request.yml file:

    name: Lint PRs with Vale
    on: pull_request
    jobs:
      vale-lint-PR:
        runs-on: ubuntu-latest
        steps:
        - uses: actions/checkout@master
          with:
            fetch-depth: 1
        - uses: gaurav-nelson/github-action-vale-lint@v0.1.0
          with:
            lint-all-files: 'yes' 
            dir-to-lint: 'directory/path/to/lint'
          env:
            GH_COMMENT_TOKEN: ${{ secrets.GH_COMMENT_TOKEN }}

Add Vale errors as comments on PR

If you want to show errors as comments on the pull request, in your repository:

  1. Go to Settings > Secrets, and slect Add a new secret.
  2. Enter GH_COMMENT_TOKEN for Name, and enter your secret token as Value.
  3. Select Add secret.