@@ -42,31 +42,10 @@ jobs:
42
42
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43
43
if : steps.unzip-patch.outputs.exists == 'true'
44
44
with :
45
+ repository : " ${{ github.event.workflow_run.head_repository.full_name }}"
46
+ ref : " ${{ github.event.workflow_run.head_branch }}"
45
47
token : ${{ steps.otelbot-token.outputs.token }}
46
48
47
- - id : get-pr
48
- if : steps.unzip-patch.outputs.exists == 'true'
49
- name : Get PR
50
- env :
51
- PR_BRANCH : |-
52
- ${{
53
- (github.event.workflow_run.head_repository.owner.login != github.event.workflow_run.repository.owner.login)
54
- && format('{0}:{1}', github.event.workflow_run.head_repository.owner.login, github.event.workflow_run.head_branch)
55
- || github.event.workflow_run.head_branch
56
- }}
57
- GH_TOKEN : ${{ github.token }}
58
- run : |
59
- echo gh pr view "${PR_BRANCH}" --json number --jq .number
60
- number=$(gh pr view "${PR_BRANCH}" --json number --jq .number)
61
- echo $number
62
- echo "number=$number" >> $GITHUB_OUTPUT
63
-
64
- - name : Check out PR branch
65
- if : steps.unzip-patch.outputs.exists == 'true'
66
- env :
67
- GH_TOKEN : ${{ github.token }}
68
- run : gh pr checkout ${{ steps.get-pr.outputs.number }}
69
-
70
49
- name : Use CLA approved github bot
71
50
if : steps.unzip-patch.outputs.exists == 'true'
72
51
# IMPORTANT do not call the .github/scripts/use-cla-approved-bot.sh
82
61
git commit -a -m "./gradlew spotlessApply"
83
62
git push
84
63
64
+ - id : get-pr
65
+ if : steps.unzip-patch.outputs.exists == 'true'
66
+ name : Get PR
67
+ env :
68
+ PR_BRANCH : |-
69
+ ${{
70
+ (github.event.workflow_run.head_repository.owner.login != github.event.workflow_run.repository.owner.login)
71
+ && format('{0}:{1}', github.event.workflow_run.head_repository.owner.login, github.event.workflow_run.head_branch)
72
+ || github.event.workflow_run.head_branch
73
+ }}
74
+ GH_TOKEN : ${{ github.token }}
75
+ run : |
76
+ number=$(gh pr view --repo "${{ github.event.workflow_run.repository.full_name }}" "${PR_BRANCH}" --json number --jq .number)
77
+ echo "number=$number" >> $GITHUB_OUTPUT
78
+
85
79
- if : steps.unzip-patch.outputs.exists == 'true' && success()
86
80
env :
87
81
GH_TOKEN : ${{ steps.otelbot-token.outputs.token }}
0 commit comments