From ff3ac46f69174f440cd68da088e71a71a41556ce Mon Sep 17 00:00:00 2001 From: River <26424577+wusatosi@users.noreply.github.com> Date: Fri, 18 Oct 2024 18:38:56 -0400 Subject: [PATCH 1/4] update premissions --- .github/workflows/pre-commit.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 147b68b..eb2c2e7 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,6 +10,8 @@ jobs: name: pre-commit permissions: contents: read + checks: write + issues: write pull-requests: write steps: From c086db14012f7fd11320f29996fc636d2da380a4 Mon Sep 17 00:00:00 2001 From: River <26424577+wusatosi@users.noreply.github.com> Date: Fri, 18 Oct 2024 18:49:44 -0400 Subject: [PATCH 2/4] fix -fail-on-error --- .github/workflows/pre-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index eb2c2e7..4dfd096 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -44,5 +44,5 @@ jobs: uses: reviewdog/action-suggester@v1 with: tool_name: pre-commit - fail_on_error: true level: warning + reviewdog_flags: "-fail-level=error" From d32a843a7b565e1f5f93344459a5dbca72e265f9 Mon Sep 17 00:00:00 2001 From: River <26424577+wusatosi@users.noreply.github.com> Date: Fri, 18 Oct 2024 19:01:59 -0400 Subject: [PATCH 3/4] remove uncessary caching --- .github/workflows/pre-commit.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 4dfd096..635fa0b 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -23,12 +23,6 @@ jobs: with: python-version: 3.13 - - name: Cache pre-commit hooks - uses: actions/cache@v2 - with: - path: ~/.cache/pre-commit - key: ${{ runner.os }}-precommit-${{ hashFiles('.pre-commit-config.yaml') }} - - name: Get Changed Files id: changed-files uses: tj-actions/changed-files@v45 From 1fd7071f90fcb6d622af18f61c7656b7bc143c44 Mon Sep 17 00:00:00 2001 From: River <26424577+wusatosi@users.noreply.github.com> Date: Fri, 18 Oct 2024 19:02:48 -0400 Subject: [PATCH 4/4] only run review dog on prs --- .github/workflows/pre-commit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 635fa0b..cc12949 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -35,6 +35,7 @@ jobs: continue-on-error: true - name: suggester / pre-commit + if: ${{ github.event_name == 'pull_request' }} uses: reviewdog/action-suggester@v1 with: tool_name: pre-commit