Skip to content

Commit 9457e03

Browse files
committed
Switch formatting job to a different suggest action.
One that supports third-party PRs. [ci skip]
1 parent 78c9ef0 commit 9457e03

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/Format.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 'Format'
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
paths: ['**/*.jl']
66
types: [opened, synchronize, reopened, ready_for_review]
77

@@ -11,7 +11,7 @@ permissions:
1111
# needed for julia-actions/cache to delete old caches
1212
actions: write
1313

14-
# needed for parkerbxyz/suggest-changes
14+
# needed for googleapis/code-suggester
1515
pull-requests: write
1616

1717
jobs:
@@ -21,6 +21,8 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323
with:
24+
ref: ${{github.event.pull_request.head.ref}}
25+
repository: ${{github.event.pull_request.head.repo.full_name}}
2426
fetch-depth: 0
2527

2628
- name: Setup Julia
@@ -35,16 +37,19 @@ jobs:
3537
julia --project=@runic -e 'using Pkg; Pkg.add("Runic")'
3638
curl -o git-runic https://raw.githubusercontent.com/fredrikekre/Runic.jl/master/bin/git-runic
3739
chmod +x git-runic
40+
sudo mv git-runic /usr/local/bin
3841
3942
- name: Run Runic
4043
run: |
4144
set +e
42-
./git-runic origin/master
45+
git runic origin/master
4346
[ $? -eq 2 ] && exit 1 || exit 0
4447
4548
- name: Suggest changes
46-
uses: parkerbxyz/suggest-changes@v2
49+
uses: googleapis/code-suggester@v2
50+
env:
51+
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4752
with:
48-
comment: 'Runic suggested the following formatting changes.'
49-
event: 'COMMENT'
50-
53+
command: review
54+
pull_number: ${{ github.event.pull_request.number }}
55+
git_dir: '.'

0 commit comments

Comments
 (0)