From 1c00ae865a7c9eb6acbef02e6473ddc92af5f0e2 Mon Sep 17 00:00:00 2001 From: "K.B.Dharun Krishna" Date: Thu, 19 Oct 2023 21:29:55 +0530 Subject: [PATCH] CI/codespell: revert changed-files action removal (#11022) * CI/codespell: revert changed-files action removal This reverts commit eca9c1e539dc715270105ead81f6f2b59eeec5ee from #10704. Post this change codespell doesn't show annotations for the PR contents as it now scanning the whole pages directory and completes execution after showing a limited number of strings. This effectively made Codespell unusable. Therefore I have reverted the change to fix Codespell, the only issue being this would reintroduce the false detection with annotations being made in translation PRs on non-English pages. * CI/codespell: use point release instead of master Using the development branch isn't ideal for production as it is prone to breakage with a faulty bug or PR. So in this commit, I am updating the codespell action to use the point release instead for more stability and versatility. Signed-off-by: K.B.Dharun Krishna --------- Signed-off-by: K.B.Dharun Krishna Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> --- .github/workflows/codespell.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index a75562cef..9ffeae413 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -9,10 +9,19 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v39.0.0 + with: + # Ignore all other languages except English + files_ignore: | + pages.*/*/* + package-lock.json + - uses: codespell-project/actions-codespell@v2 with: ignore_words_file: .github/codespell-ignore # Exit with 0 regardless of typos. only_warn: 1 - # Only check English files from the pages directory - path: pages/* + # Only check files in the PR + path: ${{ steps.changed-files.outputs.all_changed_files }}