From 2e78157c1f0e38242977b4521ed807b7ba172e86 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Mon, 14 Sep 2026 13:24:00 +1000 Subject: [PATCH] ci: sync translations only for PRs merged into main The sync workflows triggered on `pull_request: types: [closed]` with no `branches:` filter, so a PR merged into any branch fired them. A merge into the long-lived `jb2` branch opened translation PRs in every target repo for content the published edition does not carry. Mirrors the template change in QuantEcon/action-translation#308 (v0.28.1). Co-Authored-By: Claude Fable 5.1 --- .github/workflows/sync-translations-fa.yml | 4 ++++ .github/workflows/sync-translations-fr.yml | 4 ++++ .github/workflows/sync-translations-zh-cn.yml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/sync-translations-fa.yml b/.github/workflows/sync-translations-fa.yml index b5629555..46324a79 100644 --- a/.github/workflows/sync-translations-fa.yml +++ b/.github/workflows/sync-translations-fa.yml @@ -6,6 +6,10 @@ name: Sync Translations (Farsi) on: pull_request: types: [closed] + # Only merges into main sync. Without this, a PR merged into any branch + # (a long-lived migration branch, say) opens translation PRs for content + # the published edition does not carry. + branches: [main] paths: - 'lectures/**/*.md' - 'lectures/_toc.yml' diff --git a/.github/workflows/sync-translations-fr.yml b/.github/workflows/sync-translations-fr.yml index e8fc8bdd..fa8a83da 100644 --- a/.github/workflows/sync-translations-fr.yml +++ b/.github/workflows/sync-translations-fr.yml @@ -6,6 +6,10 @@ name: Sync Translations (French) on: pull_request: types: [closed] + # Only merges into main sync. Without this, a PR merged into any branch + # (a long-lived migration branch, say) opens translation PRs for content + # the published edition does not carry. + branches: [main] paths: - 'lectures/**/*.md' - 'lectures/_toc.yml' diff --git a/.github/workflows/sync-translations-zh-cn.yml b/.github/workflows/sync-translations-zh-cn.yml index 9296d879..ee0604ed 100644 --- a/.github/workflows/sync-translations-zh-cn.yml +++ b/.github/workflows/sync-translations-zh-cn.yml @@ -6,6 +6,10 @@ name: Sync Translations (Simplified Chinese) on: pull_request: types: [closed] + # Only merges into main sync. Without this, a PR merged into any branch + # (a long-lived migration branch, say) opens translation PRs for content + # the published edition does not carry. + branches: [main] paths: - 'lectures/**/*.md' - 'lectures/_toc.yml'