From a5dbe8bd6c7f897a0302103c418f7479c3930a2c Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Mon, 21 Oct 2024 02:54: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 07822bb..c90ba81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,11 @@ jobs: uses: taiki-e/github-actions/.github/workflows/release-dry-run.yml@main 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