Skip to content

Commit a81bac3

Browse files
authored
fix: use pull_request_target so release assistant works on fork PRs (#426)
1 parent 1a1f6b9 commit a81bac3

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

.github/workflows/release-assistant.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Release Assistant
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types: [opened, edited, labeled, unlabeled, synchronize]
66
branches: [main]
77

@@ -15,11 +15,8 @@ jobs:
1515
analyze:
1616
runs-on: ubuntu-latest
1717
if: |
18-
(github.event_name == 'pull_request' && github.event.pull_request.state == 'open' && github.head_ref != 'release-prep')
18+
(github.event_name == 'pull_request_target' && github.event.pull_request.state == 'open' && github.head_ref != 'release-prep')
1919
steps:
20-
- name: Checkout
21-
uses: actions/checkout@v4
22-
2320
- name: Analyze PR changes
2421
id: analysis
2522
env:
@@ -199,7 +196,7 @@ jobs:
199196
});
200197
201198
release-prep-bypass:
202-
if: github.event_name == 'pull_request' && github.head_ref == 'release-prep'
199+
if: github.event_name == 'pull_request_target' && github.head_ref == 'release-prep'
203200
runs-on: ubuntu-latest
204201
steps:
205202
- name: Set passing status for release-prep

0 commit comments

Comments
 (0)