From 9e562a77c7451dc98c98ae45a02184eb72e503ee Mon Sep 17 00:00:00 2001 From: NiallJoeMaher Date: Wed, 18 Nov 2026 14:15:46 +0000 Subject: [PATCH] ci(e2e): run on pull_request instead of pull_request_target The workflow checked out the PR head under pull_request_target, which runs fork code with the base repo's token and secrets. actions/checkout now refuses that, so every fork PR failed at checkout. Switch to pull_request (default merge-commit checkout, no secrets for forks) and fall back to a placeholder NEXTAUTH_SECRET, since e2e seeds its sessions directly. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/e2e-tests.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 12de22ca..9c7fa5af 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -4,7 +4,7 @@ on: push: branches: - develop - pull_request_target: + pull_request: types: [opened, synchronize, reopened] branches: - develop @@ -21,7 +21,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - name: Setup Node.js @@ -43,13 +42,13 @@ jobs: NEXTAUTH_URL: http://localhost:3000/api/auth GITHUB_ID: ${{ secrets.E2E_GITHUB_ID }} GITHUB_SECRET: ${{ secrets.E2E_GITHUB_SECRET }} - NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} + # Fork PRs get no secrets; e2e seeds sessions directly, so any value works. + NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET || 'e2e-placeholder-secret' }} steps: - name: Checkout repository uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - name: Setup Node.js