diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8893c671..d6612777 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 9119a998..aabf7b85 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