This action runs LanguageTool check with reviewdog on pull requests to improve code review experience.
inputs:
github_token:
description: 'GITHUB_TOKEN'
default: '${{ github.token }}'
### Flags for reviewdog ###
level:
description: 'Report level for reviewdog [info,warning,error]'
default: 'error'
reporter:
description: 'Reporter of reviewdog command [github-pr-check,github-pr-review].'
default: 'github-pr-check'
### Flags for target file ###
patterns:
description: 'Space separated target file glob patterns. https://github.com/haya14busa/ghglob'
default: '**/*.md **/*.txt'
### Flags for LanguageTool ###
# Ref: https://languagetool.org/http-api/swagger-ui/#!/default/post_check
language:
description: 'language of LanguageTool'
default: 'en-US'
enabled_rules:
description: 'comma separeted enabledRules of LanguageTool'
disabled_rules:
description: 'comma separeted disabledRules of LanguageTool'
default: 'WHITESPACE_RULE,EN_QUOTES,DASH_RULE,WORD_CONTAINS_UNDERSCORE,UPPERCASE_SENTENCE_START,ARROWS,COMMA_PARENTHESIS_WHITESPACE,UNLIKELY_OPENING_PUNCTUATION,SENTENCE_WHITESPACE,CURRENCY,EN_UNPAIRED_BRACKETS,PHRASE_REPETITION,PUNCTUATION_PARAGRAPH_END,METRIC_UNITS_EN_US,ENGLISH_WORD_REPEAT_BEGINNING_RULE'
enabled_categories:
description: 'comma separeted enabledCategories of LanguageTool'
disabled_categories:
description: 'comma separeted disabledCategories of LanguageTool'
default: 'TYPOS'
enabled_only:
description: 'enabledOnly of LanguageTool'
default: 'false'
custom_api_endpoint:
description: 'Custom API endpoint of LanguageTool server. e.g. https://languagetool.org/api'
default: ''
name: reviewdog
on: [pull_request]
jobs:
linter_name:
name: runner / <linter-name>
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: reviewdog/action-languagetool@v1
with:
github_token: ${{ secrets.github_token }}
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
reporter: github-pr-review
# Change reporter level if you need.
level: info
You can bump version on merging Pull Requests with specific labels (bump:major,bump:minor,bump:patch). Pushing tag manually by yourself also work.
This action updates major/minor release tags on a tag push. e.g. Update v1 and v1.2 tag when released v1.2.3. ref: https://help.github.com/en/articles/about-actions#versioning-your-action
This reviewdog action template itself is integrated with reviewdog to run lints which is useful for Docker container based actions.
Supported linters:
This repository uses haya14busa/action-depup to update reviewdog version.