Skip to content
check-circle

GitHub Action

Spellchecker CLI Summary

v1.0 Latest version

Spellchecker CLI Summary

check-circle

Spellchecker CLI Summary

Output checks, issues, and job summary from Spellchecker CLI

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Spellchecker CLI Summary

uses: austenstone/[email protected]

Learn more about this action in austenstone/spellchecker-cli-action-summary

Choose a version

Action

An Action that creates job summaries, status checks, and issues for markdown spelling errors reported by tbroadley/spellchecker-cli.

Issue & Job Summary

Get a table of all the misspelled words with suggested fixes and links directly to the file/line. The job summary is always created and the issue summary is created if the job is not of event type push or pull_request. The issue summary contains all misspelled words but the job summary only contains results from the files that have changed if the event is of type push or pull_request.

image

Status Checks

Status checks will be reported if the event is of type pull_request.

Annotations

The status checks contain inline annotations that will appear in the files changed view of the pull request. See Getting started with the Checks API.

image

Note
The check may fail with annotations if the exact line number and columns aren't output.
See open issue tbroadley/spellchecker-cli#102

Dictionary

You can use a dictionary located at .github/dictionary.txt to ignore words from the spell check.

GitHub
Git
Kubernetes
Spotify

Slash commands

You can use slash commands to add to the dictionary from issues or prs.

image

image

Workflow Dispatch

Or you can run it from the Actions workflow page.

image

Protected branches

If the branch is protected a pull request will be opened.

Screen Shot 2022-09-03 at 12 12 17 AM

Triggering runs

Workflows cannot be triggered from other workflows like the dictionary add with the default GITHUB_TOKEN. Consider using one of the techniques outlines in Triggering further workflow runs by @peter-evans.

Usage

Create a workflow (eg: .github/workflows/seat-count.yml). See Creating a Workflow file.

Reusable Workflow Example

Use the reusable workflow spellcheck.yml to easily implement this action in your repository.

name: Spell Check .md
on:
  schedule:
    - cron: "0 0 1 * *"

jobs:
  spellcheck:
    uses: austenstone/spellchecker-cli-action-summary/.github/workflows/spellcheck.yml@main

Reusable Workflow Example Dictionary Add

You can also add dictionary functionality.

name: Spell Check Dictionary Add
on:
  workflow_dispatch:
    inputs:
      words:
        type: string
        description: Words to add to the dictionary
        required: true

jobs:
  spellcheck:
    uses: austenstone/spellchecker-cli-action-summary/.github/workflows/spellcheck-dictionary-add.yml@main
    with:
      words: ${{ inputs.words }}

➡️ Inputs

Various inputs are defined in action.yml:

Name Description Default
github-token Token to use to authorize. ${{ github-token }}
file-json JSON file containing the list of files to check. ${{ file-json }}
files-changed List of files to check. ${{ files-changed }}

Further help

To get more help on the Actions see documentation.