GitHub Action
Spellchecker CLI Summary
An Action that creates job summaries, status checks, and issues for markdown spelling errors reported by tbroadley/spellchecker-cli.
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
.
Status checks will be reported if the event is of type pull_request
.
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.
Note
The check may fail with annotations if the exact line number and columns aren't output.
See open issue tbroadley/spellchecker-cli#102
You can use a dictionary located at .github/dictionary.txt
to ignore words from the spell check.
GitHub
Git
Kubernetes
Spotify
You can use slash commands to add to the dictionary from issues or prs.
Or you can run it from the Actions workflow page.
If the branch is protected a pull request will be opened.
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.
Create a workflow (eg: .github/workflows/seat-count.yml
). See Creating a Workflow file.
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
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 }}
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 }} |
To get more help on the Actions see documentation.