From 9a64d69ca059ba50ea393fc407e395303fa89a3c Mon Sep 17 00:00:00 2001 From: Wilhelm Schuster Date: Thu, 18 Sep 2025 10:56:34 +0200 Subject: [PATCH] Only try making a spotless fix PR when on the main repo (#52) --- .github/workflows/build-and-test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 07d4c22..a38fc17 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -88,7 +88,11 @@ jobs: retention-days: 31 - name: Attempt to make a PR fixing spotless errors - if: ${{ failure() && steps.build_mod.conclusion == 'failure' && github.event_name == 'pull_request' && !github.event.pull_request.draft }} + if: >- + ${{ failure() && steps.build_mod.conclusion == 'failure' + && github.event_name == 'pull_request' + && !github.event.pull_request.draft + && github.event.pull_request.head.repo.full_name == github.repository }} run: | git reset --hard git checkout "${PR_BRANCH}"