From 50a986f331e326b02c9059d0dcdc5acc19a7ff0d Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Fri, 4 Jul 2025 19:34:44 -0500 Subject: [PATCH] fix: workflow branch target/base (#5637) --- .github/workflows/locale-sync.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/locale-sync.yml b/.github/workflows/locale-sync.yml index 3b78a9fc3..a5b4999df 100644 --- a/.github/workflows/locale-sync.yml +++ b/.github/workflows/locale-sync.yml @@ -76,7 +76,11 @@ jobs: git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - # Create a new branch + # Use the current branch as the base + BASE_BRANCH="${{ github.ref_name }}" + echo "Using base branch: $BASE_BRANCH" + + # Create a new branch from the base branch BRANCH_NAME="auto-locale-sync-$(date +%Y%m%d-%H%M%S)" git checkout -b "$BRANCH_NAME" @@ -89,18 +93,19 @@ jobs: sleep 2 - # Create PR using GitHub CLI - gh pr create --title "chore: automatic locale sync" --body "## Summary + # Create PR using GitHub CLI with explicit repository + gh pr create \ + --repo "${{ github.repository }}" \ + --title "chore: automatic locale sync" \ + --base "$BASE_BRANCH" \ + --head "$BRANCH_NAME" \ + --body "## Summary Automatically generated locale updates from the weekly sync job. ## Changes - Updated frontend locale files - - Generated from latest translation sources - - ## Test plan - - [ ] Verify locale files are properly formatted - - [ ] Test that translations load correctly in the frontend" --base dev --head "$BRANCH_NAME" + - Generated from latest translation sources" \ env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}