Skip to content

Commit 054df84

Browse files
author
Jonathan Visser
committed
fix: allow fork PRs to post review suggestions in lint workflow
Use pull_request_target to enable write access for fork PRs. Upgrade actions/checkout to v4 and actions/setup-python to v5 to address Node.js 20 deprecation warning.
1 parent 62fc26f commit 054df84

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/lint.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Run linting and suggest changes
22

33
on:
4-
pull_request:
4+
pull_request_target:
55

66
permissions:
77
contents: read
@@ -15,8 +15,10 @@ jobs:
1515
python-version: ['3.12']
1616

1717
steps:
18-
- uses: actions/checkout@v3
19-
- uses: actions/setup-python@v4
18+
- uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.event.pull_request.head.sha }}
21+
- uses: actions/setup-python@v5
2022
with:
2123
python-version: ${{ matrix.python-version }}
2224
- name: Install dependencies

0 commit comments

Comments
 (0)