Skip to content

Commit 9bf1df9

Browse files
atergaclaude
andauthored
fix(ci): use pull_request_target for Slack review notifications (#3731)
## Changes - Changed workflow trigger from `pull_request` to `pull_request_target` in PR review notification workflow ## Rationale Using `pull_request_target` instead of `pull_request` allows the workflow to have proper access to repository secrets and permissions when handling review requests, which is necessary for sending Slack notifications reliably. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3e99bbb commit 9bf1df9

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/pr-review-requested.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
name: PR Review Requested
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types: [review_requested]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
notify-slack:
12+
if: >-
13+
github.event.pull_request.author_association == 'MEMBER' ||
14+
github.event.pull_request.author_association == 'OWNER' ||
15+
github.event.pull_request.author_association == 'COLLABORATOR'
916
runs-on: ubuntu-latest
1017
steps:
1118
- uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.event.pull_request.base.sha }}
21+
persist-credentials: false
1222
- name: Send Slack notification on PR review requested
1323
if: github.event.requested_reviewer.login == 'danblackadder' || github.event.requested_reviewer.login == 'aterga' || github.event.requested_reviewer.login == 'sea-snake' || github.event.requested_reviewer.login == 'lmuntaner'
1424
uses: ./.github/actions/slack

0 commit comments

Comments
 (0)