From ddc9ea9d60189f21b7f677862cc97d30e9f8ff19 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Mon, 21 Oct 2024 03:00:49 +0900 Subject: [PATCH] ci: Auto-update cspell dictionary --- .github/workflows/ci.yml | 5 +++++ tools/tidy.sh | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfc1f27..4fd02a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,11 @@ jobs: event_name: ${{ github.event_name }} tidy: uses: taiki-e/github-actions/.github/workflows/tidy.yml@main + permissions: + contents: read + pull-requests: write # for gh pr edit --add-assignee + repository-projects: read # for gh pr edit --add-assignee + secrets: inherit test: strategy: diff --git a/tools/tidy.sh b/tools/tidy.sh index 9119a99..aabf7b8 100755 --- a/tools/tidy.sh +++ b/tools/tidy.sh @@ -750,7 +750,9 @@ EOF if [[ -n "${dependencies_words}" ]]; then LC_ALL=C sort -f >>.github/.cspell/rust-dependencies.txt <<<"${dependencies_words}"$'\n' fi - check_diff .github/.cspell/rust-dependencies.txt + if [[ -z "${REMOVE_UNUSED_WORDS:-}" ]]; then + check_diff .github/.cspell/rust-dependencies.txt + fi if ! grep -Fq '.github/.cspell/rust-dependencies.txt linguist-generated' .gitattributes; then error "you may want to mark .github/.cspell/rust-dependencies.txt linguist-generated" fi