From bf8779b3b781cf9ee3829c1820e2a1518c65f501 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Mon, 21 Oct 2024 02:54:16 +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 c47fc0a..e5515bc 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