Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/spell_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
required: false
type: boolean
default: true
check_pr_title:
required: false
type: boolean
default: false
working_directory:
required: false
type: string
Expand All @@ -48,3 +52,9 @@ jobs:
incremental_files_only: ${{inputs.modified_files_only}}
root: ${{inputs.working_directory}}
verbose: ${{inputs.verbose}}

- name: 🪄 Spell Check PR Title
if: inputs.check_pr_title && github.event_name == 'pull_request'
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: echo "$PR_TITLE" | npx --yes cspell@8 stdin --config "${{inputs.config}}" --no-progress --no-summary
8 changes: 8 additions & 0 deletions site/docs/workflows/spell_check.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The spell check workflow consists of the following steps:

1. Git checkout
2. Run spell check
3. Run spell check on the pull request title (when `check_pr_title` is enabled)

## Inputs

Expand Down Expand Up @@ -51,6 +52,12 @@ The spell check workflow consists of the following steps:

**Default** `true`

### `check_pr_title`

**Optional** An optional boolean which determines whether the pull request title is spell checked using the same `config`. Only runs on `pull_request` events.

**Default** `false`

## Example Usage

```yaml
Expand All @@ -68,6 +75,7 @@ jobs:
.*/**/*.yml
runs_on: macos-latest
modified_files_only: false
check_pr_title: true
working_directory: examples/my_project
```

Expand Down