From 84a240d80eb2de5aaebf69a1d3ea8df6a8faaa0a Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Sun, 5 Apr 2026 14:32:01 -0400 Subject: [PATCH] Fix headRepository owner lookup in deploy preview gh pr view returns the owner as a separate headRepositoryOwner field, not nested inside headRepository. Use headRepositoryOwner.login instead of headRepository.owner.login. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/deploy-preview.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 2ce2bce93..9e9b1ab90 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -82,9 +82,9 @@ jobs: run: | if [ -n "${{ github.event.inputs.prNum }}" ]; then PR_NUM="${{ github.event.inputs.prNum }}" - PR_JSON=$(gh pr view "$PR_NUM" --repo "${{ github.repository }}" --json headRefName,headRepository) + PR_JSON=$(gh pr view "$PR_NUM" --repo "${{ github.repository }}" --json headRefName,headRepository,headRepositoryOwner) BRANCH=$(echo "$PR_JSON" | jq -r '.headRefName') - REPO=$(echo "$PR_JSON" | jq -r '.headRepository.owner.login + "/" + .headRepository.name') + REPO=$(echo "$PR_JSON" | jq -r '.headRepositoryOwner.login + "/" + .headRepository.name') else PR_NUM="${{ github.event.workflow_run.pull_requests[0].number }}" BRANCH="${{ github.event.workflow_run.head_branch }}"