From c9392806ac0604e1ee98507bb97dc8bc221822c3 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 13 Jul 2025 11:51:54 +1000 Subject: [PATCH] Hardcode repository owner to 'wailsapp' - simplify logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/changelog-v3.yml | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/.github/workflows/changelog-v3.yml b/.github/workflows/changelog-v3.yml index ee45b710c..dc8bdb684 100644 --- a/.github/workflows/changelog-v3.yml +++ b/.github/workflows/changelog-v3.yml @@ -105,35 +105,14 @@ jobs: # Ensure validation script doesn't get committed echo "v3/scripts/validate-changelog.go" >> .git/info/exclude # Get the correct branch name to push to + REPO_OWNER="wailsapp" # Always wailsapp for this repo + if [ "${{ github.event_name }}" = "pull_request" ]; then BRANCH_NAME="${{ github.event.pull_request.head.ref }}" - 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" - + PR_INFO=$(gh pr view ${{ steps.pr_info.outputs.pr_number }} --json headRefName) BRANCH_NAME=$(echo "$PR_INFO" | jq -r '.headRefName') - REPO_OWNER=$(echo "$PR_INFO" | jq -r '.headRepository.owner.login') - - echo "🌿 Branch: $BRANCH_NAME" - echo "👤 Owner: $REPO_OWNER" - - # Multiple fallback strategies for owner detection - if [ "$REPO_OWNER" = "null" ] || [ -z "$REPO_OWNER" ]; then - 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 echo "Pushing to branch: $BRANCH_NAME in repo: $REPO_OWNER"