File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 5858 if : ${{ failure() && steps.build_mod.conclusion == 'failure' && github.event_name == 'pull_request' && !github.event.pull_request.draft }}
5959 run : |
6060 git reset --hard
61- git checkout "${PR_BRANCH }"
61+ git checkout "${github.ref_name }"
6262 ./gradlew --info spotlessApply || exit 1
6363 git diff --exit-code && exit 1
6464 git config user.name "GitHub Actions"
@@ -68,15 +68,14 @@ jobs:
6868 git push --force-with-lease origin "${FIXED_BRANCH}"
6969 gh pr create \
7070 --head "${FIXED_BRANCH}" \
71- --base "${PR_BRANCH }" \
71+ --base "${github.ref_name }" \
7272 --title "Spotless apply for branch ${{ github.event.pull_request.head.ref }} for #${{ github.event.pull_request.number }}" \
7373 --body "Automatic spotless apply to fix formatting errors, applies to PR #${{ github.event.pull_request.number }}" \
7474 2>&1 | tee pr-message.log || true
75- gh pr comment "${PR_BRANCH }" -F pr-message.log || true
75+ gh pr comment "${github.ref_name }" -F pr-message.log || true
7676 shell : bash # ensures set -eo pipefail
7777 env :
7878 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
79- PR_BRANCH : ${{ github.head_ref }}
8079 FIXED_BRANCH : ${{ github.head_ref }}-spotless-fixes
8180
8281 - name : Run server for ${{ inputs.timeout }} seconds
Original file line number Diff line number Diff line change 3636 run : ./gradlew --info spotlessCheck
3737
3838 - name : Attempt to make a PR fixing spotless errors
39- if : failure()
39+ if : failure() && steps.build.conclusion == 'failure'
4040 run : |
4141 git reset --hard
4242 git checkout "${PR_BRANCH}"
You can’t perform that action at this time.
0 commit comments