From a654576f2f555135a4c9c6ac7dd9f2f041f1476f Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Mon, 14 Sep 2026 13:23:28 +1000 Subject: [PATCH 1/2] 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-zh-cn.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/sync-translations-zh-cn.yml b/.github/workflows/sync-translations-zh-cn.yml index 468c7d88..700b1e58 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' From b72728171093245d4db2a200854d38ea7c564ced Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Mon, 14 Sep 2026 14:03:55 +1000 Subject: [PATCH 2/2] ci: clearer wording on the branch-filter comment Co-Authored-By: Claude Fable 5.1 --- .github/workflows/sync-translations-zh-cn.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sync-translations-zh-cn.yml b/.github/workflows/sync-translations-zh-cn.yml index 700b1e58..42d793f2 100644 --- a/.github/workflows/sync-translations-zh-cn.yml +++ b/.github/workflows/sync-translations-zh-cn.yml @@ -6,9 +6,9 @@ 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. + # Only PRs merged into main trigger a 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'