From 69f7bacbd01eb24de0e602c8a5b71ee52d41e624 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Mon, 14 Sep 2026 13:23:33 +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 58077a993..e14ebd7ef 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 0cab03d6bab4007475f20528525d49798fe3b050 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Mon, 14 Sep 2026 14:03:58 +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 e14ebd7ef..9242f60ba 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'