Add comprehensive debugging and multiple fallback strategies for repository owner detection

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Lea Anthony 2025-07-13 11:51:20 +10:00
commit a8a1f362cb

View file

@ -110,12 +110,29 @@ jobs:
REPO_OWNER="${{ github.event.pull_request.head.repo.owner.login }}"
else
# For manual workflow dispatch, get PR info
echo "🔍 Fetching PR info for #${{ steps.pr_info.outputs.pr_number }}..."
PR_INFO=$(gh pr view ${{ steps.pr_info.outputs.pr_number }} --json headRefName,headRepository)
echo "📋 Raw PR info: $PR_INFO"
BRANCH_NAME=$(echo "$PR_INFO" | jq -r '.headRefName')
REPO_OWNER=$(echo "$PR_INFO" | jq -r '.headRepository.owner.login')
# Fallback if owner is null/empty
echo "🌿 Branch: $BRANCH_NAME"
echo "👤 Owner: $REPO_OWNER"
# Multiple fallback strategies for owner detection
if [ "$REPO_OWNER" = "null" ] || [ -z "$REPO_OWNER" ]; then
REPO_OWNER="wailsapp"
echo "⚠️ Repository owner is null/empty, trying alternative methods..."
# Try getting owner from GitHub context
REPO_OWNER="${{ github.repository_owner }}"
echo "🏢 Context owner: $REPO_OWNER"
# Final fallback to hardcoded value
if [ "$REPO_OWNER" = "null" ] || [ -z "$REPO_OWNER" ]; then
REPO_OWNER="wailsapp"
echo "🔧 Using fallback: $REPO_OWNER"
fi
fi
fi