From 652eea28e560daba716a56ec7694abd15b0957a2 Mon Sep 17 00:00:00 2001 From: "unicoderbot[bot]" <269805761+unicoderbot[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 12:28:13 +0000 Subject: [PATCH] feat: add spell checking on PR titles Closes #105 Co-authored-by: marcossevilla --- .github/workflows/spell_check.yml | 10 ++++++++++ site/docs/workflows/spell_check.md | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/spell_check.yml b/.github/workflows/spell_check.yml index 7f363ae6..ca52a038 100644 --- a/.github/workflows/spell_check.yml +++ b/.github/workflows/spell_check.yml @@ -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 @@ -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 diff --git a/site/docs/workflows/spell_check.md b/site/docs/workflows/spell_check.md index 6c01d6b7..5eb89a2d 100644 --- a/site/docs/workflows/spell_check.md +++ b/site/docs/workflows/spell_check.md @@ -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 @@ -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 @@ -68,6 +75,7 @@ jobs: .*/**/*.yml runs_on: macos-latest modified_files_only: false + check_pr_title: true working_directory: examples/my_project ```