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}"