From 44b9c54d69ee8cface714d051829147eb01499f4 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Mon, 21 Oct 2024 03:01:52 +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 dead812..511f372 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,6 +51,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