Skip to content

Commit

Permalink
Switch formatting job to a different suggest action.
Browse files Browse the repository at this point in the history
One that supports third-party PRs.

[ci skip]
  • Loading branch information
maleadt committed Jan 10, 2025
1 parent 774abc6 commit 8d810d7
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/Format.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 'Format'

on:
pull_request:
pull_request_target:
paths: ['**/*.jl']
types: [opened, synchronize, reopened, ready_for_review]

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

# needed for parkerbxyz/suggest-changes
# needed for googleapis/code-suggester
pull-requests: write

jobs:
Expand All @@ -21,6 +21,8 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0

- name: Setup Julia
Expand All @@ -35,15 +37,19 @@ jobs:
julia --project=@runic -e 'using Pkg; Pkg.add("Runic")'
curl -o git-runic https://raw.githubusercontent.com/fredrikekre/Runic.jl/master/bin/git-runic
chmod +x git-runic
sudo mv git-runic /usr/local/bin
- name: Run Runic
run: |
set +e
./git-runic origin/master
git runic origin/master
[ $? -eq 2 ] && exit 1 || exit 0
- name: Suggest changes
uses: parkerbxyz/suggest-changes@v2
uses: googleapis/code-suggester@v2
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
comment: 'Runic suggested the following formatting changes.'
event: 'COMMENT'
command: review
pull_number: ${{ github.event.pull_request.number }}
git_dir: '.'

0 comments on commit 8d810d7

Please sign in to comment.