From 308e77fb0b970a544e3b32861d8ca2f0070cd098 Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Sat, 28 Jan 2023 16:25:26 +0000 Subject: [PATCH] Fix spotless PR git commands (#21) I was using the wrong git commands before, this should work, at least it does locally for me --- .github/workflows/build-and-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index b6bf541..f95161c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -67,7 +67,8 @@ jobs: - 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 }} run: | - git reset --hard "${PR_BRANCH}" + git reset --hard + git checkout --theirs "${PR_BRANCH}" ./gradlew --info --stacktrace spotlessApply || exit 1 git diff --exit-code && exit 1 git config user.name "GitHub GTNH Actions"