Skip to content

Commit 393aa83

Browse files
mmckyclaude
andauthored
Rebase pushes with the machine-user PAT (action-translation#125) (#139)
Commits pushed with the default GITHUB_TOKEN trigger no workflows, so a rebased branch gets a run-less head: force-pushed re-translated content lands unreviewed, and with required checks a run-less head blocks merging. Measured both ways on the test harness 2026-07-21 — zero runs under GITHUB_TOKEN, review triggered under the PAT. Sync mode has always passed the PAT for exactly this reason; rebase pushing to the same PRs with a weaker token was an inconsistency, not a decision. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3b460fb commit 393aa83

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/rebase-translations.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# When a translation PR is merged, this workflow automatically rebases the
55
# other open translation PRs against the updated main branch. It covers both
66
# kinds this tool creates: `translation-sync-*` branches from the Action's sync
7-
# mode, and `resync/*` branches from the CLI's `forward --github`.
7+
# mode, and `resync/*` branches from the CLI's `translate forward --github`.
88
#
99
# This eliminates merge conflicts caused by multiple upstream PRs
1010
# modifying the same files. See: https://github.com/QuantEcon/action-translation/issues/63
@@ -20,7 +20,7 @@ on:
2020
jobs:
2121
rebase:
2222
# Only run when a translation PR is merged. Both prefixes must be listed:
23-
# sync mode creates `translation-sync-*`, while the CLI's `forward --github`
23+
# sync mode creates `translation-sync-*`, while the CLI's `translate forward --github`
2424
# creates `resync/*`, and a wave of resync PRs goes stale the same way.
2525
# Keep this in step with `isTranslationBranch` in the action's src/branch-naming.ts
2626
# — this `if` decides whether the job runs, that predicate decides which open PRs
@@ -46,4 +46,11 @@ jobs:
4646
with:
4747
mode: rebase
4848
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
49-
github-token: ${{ secrets.GITHUB_TOKEN }}
49+
# PAT rather than the default GITHUB_TOKEN, deliberately: commits pushed
50+
# with GITHUB_TOKEN trigger no workflows (GitHub's recursion guard), so a
51+
# rebased branch ends up with a run-less head — force-pushed re-translated
52+
# content lands unreviewed, and with required checks a run-less head blocks
53+
# merging. Validated both ways on the test harness, 2026-07-21: zero runs
54+
# under GITHUB_TOKEN, review triggered under the PAT.
55+
# See QuantEcon/action-translation#125.
56+
github-token: ${{ secrets.QUANTECON_SERVICES_PAT }}

0 commit comments

Comments
 (0)