mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
fix(ci): opt in fork PR checkout for Codex review (#1107)
GitHub's 2026-07-20 actions/checkout backport refuses fork PR refs under pull_request_target unless allow-unsafe-pr-checkout is set. HAPI Bot needs the merge ref plus base-repo secrets; this restores fork contributor reviews. Co-authored-by: Debian <heavygee@oos-linux.in.lockhouse> Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Debian
Cursor
parent
3dd425b15c
commit
a9115715f8
@@ -85,12 +85,16 @@ jobs:
|
||||
env:
|
||||
HAPI_BOT_LOGINS: ${{ vars.HAPI_BOT_LOGINS }}
|
||||
|
||||
# Codex reviews the PR merge ref under pull_request_target (needs base-repo
|
||||
# secrets). GitHub's 2026-07-20 checkout backport refuses fork PR checkouts
|
||||
# here unless explicitly opted in: https://github.blog/changelog/2026-06-18-safer-pull_request_target-defaults-for-github-actions-checkout/
|
||||
- name: Checkout repository
|
||||
if: steps.check_bot.outputs.has_review_for_current_head != 'true'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||
fetch-depth: 0
|
||||
allow-unsafe-pr-checkout: true
|
||||
|
||||
- name: Pre-fetch base and head refs
|
||||
if: steps.check_bot.outputs.has_review_for_current_head != 'true'
|
||||
|
||||
Reference in New Issue
Block a user