From 6d45291bf81ea89fc384baefaaba24d87ba976a6 Mon Sep 17 00:00:00 2001 From: kcw-grunt Date: Sat, 22 Aug 2026 22:23:34 +0100 Subject: [PATCH] fix: only run auto-translate on push to main/develop, not every PR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dropped the pull_request trigger. It re-fired the workflow on every commit pushed to any PR touching Localizable.xcstrings — including long-lived release branches (4 translation PRs spawned against release/v3.9.16-into-main in one afternoon) and the bot's own PR check runs (#188, opened against the '184/merge' ref while #184 was still under review, duplicating #189's content once #184 actually merged). Translations only need generating once a change actually lands on main/develop, not during PR review, so push-only is sufficient and removes the self-duplicating behavior. Also drops the now-dead github.event.pull_request.* fallbacks that existed only to support that trigger. Co-Authored-By: grunt-claude-bot Co-Authored-By: kcw-grunt --- .github/workflows/auto-translate-ios.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-translate-ios.yml b/.github/workflows/auto-translate-ios.yml index 05b6e75a..a95a806c 100644 --- a/.github/workflows/auto-translate-ios.yml +++ b/.github/workflows/auto-translate-ios.yml @@ -7,12 +7,6 @@ on: - develop paths: - '**/Localizable.xcstrings' - pull_request: - branches: - - main - - develop - paths: - - '**/Localizable.xcstrings' workflow_dispatch: inputs: force_retranslate: @@ -39,7 +33,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - ref: ${{ github.event.pull_request.head.sha || github.ref }} + ref: ${{ github.ref }} token: ${{ secrets.TRANSLATION_PAT_GHA_CLAUDE_JUL082026 }} - name: Set up Python @@ -85,7 +79,7 @@ jobs: gh pr create \ --title "🌍 Auto-translations: missing iOS strings updated" \ --body "$(cat /tmp/pr_body.md)" \ - --base "${{ github.event.pull_request.base.ref || github.ref_name }}" \ + --base "${{ github.ref_name }}" \ --head "$BRANCH" \ --label "translations" \ --reviewer "${{ github.actor }}" \ No newline at end of file