Skip to content

Commit c58db7c

Browse files
authored
Revert pull-request-helper change (#4585)
1 parent ceb4f27 commit c58db7c

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

.github/workflows/pull-request-helper.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
name: Pull request helper
22
on:
3-
push:
4-
branches:
5-
- 'dependabot/**/*'
3+
pull_request_target:
64

75
permissions:
86
contents: write
97

108
jobs:
119
pull-request-helper:
10+
if: github.event.pull_request.user.login == 'dependabot[bot]'
1211
runs-on: ubuntu-latest
1312
steps:
1413
- uses: actions/checkout@v6
14+
with:
15+
# this is the personal access token used for "git push" below
16+
# which is needed in order to trigger workflows
17+
token: ${{ secrets.PR_HELPER_GITHUB_TOKEN }}
18+
19+
- name: Check out PR branch
20+
env:
21+
NUMBER: ${{ github.event.pull_request.number }}
22+
GH_TOKEN: ${{ github.token }}
23+
run: |
24+
gh pr checkout $NUMBER
1525
1626
- name: Setup Gradle
1727
uses: gradle/actions/setup-gradle@v5
@@ -23,6 +33,16 @@ jobs:
2333
git config user.name github-actions[bot]
2434
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
2535
36+
# - name: Spotless
37+
# env:
38+
# NUMBER: ${{ github.event.issue.number }}
39+
# run: |
40+
# ./gradlew spotlessApply
41+
# if git diff --quiet; then
42+
# exit 0 # success
43+
# fi
44+
# git commit -a -m "./gradlew spotlessApply"
45+
2646
- name: Update license report
2747
env:
2848
NUMBER: ${{ github.event.issue.number }}
@@ -50,4 +70,7 @@ jobs:
5070
git commit -m "./gradlew resolveAndLockAll --write-locks"
5171
5272
- name: Push
53-
run: git push
73+
env:
74+
GH_TOKEN: ${{ github.token }}
75+
run: |
76+
git push

0 commit comments

Comments
 (0)