From dfcb24cb54d2861a08a6c6184a9ce6cc7ff7801c Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Wed, 10 Jun 2026 20:16:20 +0300 Subject: [PATCH 1/2] fix: use org-repo cspell config for spell check in check-pr-title The spell check step was running in the project-repo working directory, so cspell would look for cspell.config.yml in the calling repo (which often doesn't have one). This caused false positives where words already defined in the org-repo's cspell.config.yml (like 'setuptools', 'pyproject') were flagged as unknown. Now pass --config pointing to the org-repo's cspell.config.yml, matching the pattern already used by the committed step with committed.toml. Fixes #76 --- .github/workflows/pre-commit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 50a2291..6501168 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -83,7 +83,7 @@ jobs: with: node-version: latest - name: spell check - working-directory: project-repo env: PR_TITLE: "${{ steps.get-title.outputs.title }}" - run: echo "${PR_TITLE}" | npx cspell-cli lint stdin + CSPELL_CONFIG: ${{ github.workspace }}/org-repo/cspell.config.yml + run: echo "${PR_TITLE}" | npx cspell-cli lint --config "${CSPELL_CONFIG}" stdin From 9a0b51561516acd9a2791c168a91135f3f0e31a6 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Thu, 11 Jun 2026 23:54:41 +0300 Subject: [PATCH 2/2] fix: prefer project cspell config, fallback to org config If project-repo/cspell.config.yml exists, use it for spell check. Otherwise, fall back to org-repo/cspell.config.yml. This addresses the concern that each project should be able to maintain its own cspell dictionary rather than accumulating all words in the org-level config. --- .github/workflows/pre-commit.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 6501168..8888238 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -85,5 +85,10 @@ jobs: - name: spell check env: PR_TITLE: "${{ steps.get-title.outputs.title }}" - CSPELL_CONFIG: ${{ github.workspace }}/org-repo/cspell.config.yml - run: echo "${PR_TITLE}" | npx cspell-cli lint --config "${CSPELL_CONFIG}" stdin + run: | + if [ -f project-repo/cspell.config.yml ]; then + CSPELL_CONFIG="project-repo/cspell.config.yml" + else + CSPELL_CONFIG="org-repo/cspell.config.yml" + fi + echo "${PR_TITLE}" | npx cspell-cli lint --config "${CSPELL_CONFIG}" stdin