Skip to content

Commit 6eb6bd8

Browse files
drmowinckelsclaude
andcommitted
Switch caller triggers from pull_request to pull_request_target
Fork-PR welcomes and thanks were failing because pull_request events from forks run with a read-only token and no secrets access — the jinx app token can't be minted, the workflow dies before posting. pull_request_target runs in the upstream repo's context with full secrets access, so the welcome/thank/checklist comments fire on fork PRs too. The workflows don't check out PR head code, so the usual pull_request_target security concern (running untrusted code with secrets) doesn't apply here — they only post a comment via the app token. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e334ba7 commit 6eb6bd8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/hello.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Hello on PR or Issue
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types: [opened, closed]
66
issues:
77
types: [opened]
@@ -19,7 +19,7 @@ jobs:
1919
JINX_PRIVATE_KEY: ${{ secrets.JINX_PRIVATE_KEY }}
2020

2121
thank:
22-
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
22+
if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true
2323
uses: rladies/jinx/.github/workflows/reusable-thank-contributor.yml@main
2424
secrets:
2525
JINX_APP_ID: ${{ secrets.JINX_APP_ID }}

0 commit comments

Comments
 (0)