Skip to content

Latest commit

 

History

History
107 lines (87 loc) · 4.97 KB

README.md

File metadata and controls

107 lines (87 loc) · 4.97 KB

action-languagetool

Test reviewdog depup release GitHub release (latest SemVer) action-bumpr supported

github-pr-review demo github-pr-check demo

This action runs LanguageTool check with reviewdog on pull requests to improve code review experience.

Input

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: ''

Usage

name: reviewdog
on: [pull_request]
jobs:
  linter_name:
    name: runner / <linter-name>
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - 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

Development

Release

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

Lint - reviewdog integration

This reviewdog action template itself is integrated with reviewdog to run lints which is useful for Docker container based actions.

reviewdog integration

Supported linters:

Dependencies Update Automation

This repository uses haya14busa/action-depup to update reviewdog version.

reviewdog depup demo