Skip to content

Commit 248244b

Browse files
committed
FIX
1 parent fee693e commit 248244b

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/auto-spotless-apply.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ jobs:
3737
with:
3838
token: ${{ github.token }}
3939

40-
- id: get-pr-number
40+
- id: get-pr
4141
if: steps.unzip-patch.outputs.exists == 'true'
42-
name: Get PR number
42+
name: Get PR
4343
env:
4444
PR_BRANCH: |-
4545
${{
@@ -49,13 +49,16 @@ jobs:
4949
}}
5050
GH_TOKEN: ${{ github.token }}
5151
run: |
52-
gh pr view "${PR_BRANCH}" --json 'number' --jq '"pr-number=\(.number)' >> $GITHUB_OUTPUT
52+
echo gh pr view "${PR_BRANCH}" --json number --jq .number
53+
number=$(gh pr view "${PR_BRANCH}" --json number --jq .number)
54+
echo $number
55+
echo "number=$number" >> $GITHUB_OUTPUT
5356
5457
- name: Check out PR branch
5558
if: steps.unzip-patch.outputs.exists == 'true'
5659
env:
5760
GH_TOKEN: ${{ github.token }}
58-
run: gh pr checkout ${{ steps.get-pr-number.outputs.pr-number }}
61+
run: gh pr checkout ${{ steps.get-pr.outputs.number }}
5962

6063
- name: Use CLA approved github bot
6164
if: steps.unzip-patch.outputs.exists == 'true'
@@ -76,10 +79,10 @@ jobs:
7679
env:
7780
GH_TOKEN: ${{ github.token }}
7881
run: |
79-
gh pr comment ${{ steps.get-pr-number.outputs.pr-number }} --body "🔧 The result from spotlessApply was committed to the PR branch."
82+
gh pr comment ${{ steps.get-pr.outputs.number }} --body "🔧 The result from spotlessApply was committed to the PR branch."
8083
8184
- if: steps.unzip-patch.outputs.exists == 'true' && failure()
8285
env:
8386
GH_TOKEN: ${{ github.token }}
8487
run: |
85-
gh pr comment ${{ steps.get-pr-number.outputs.pr-number }} --body "❌ The result from spotlessApply could not be committed to the PR branch, see logs: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID."
88+
gh pr comment ${{ steps.get-pr.outputs.number }} --body "❌ The result from spotlessApply could not be committed to the PR branch, see logs: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID."

0 commit comments

Comments
 (0)