Skip to content

Commit a3a32bd

Browse files
mmckyclaude
andcommitted
Rebase: require a same-repo head branch (fork noise guard)
Mirrors action-translation#130; see the PAT rollout review. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7e0110f commit a3a32bd

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/rebase-translations.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ jobs:
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
2727
# it then rebases, so a prefix matching only one of them is a no-op run.
28+
# The head-repo check is belt-and-braces: fork PRs never receive secrets, so
29+
# the PAT is not exposed either way — but a merged fork PR whose branch happens
30+
# to match a prefix would otherwise start this job with an empty token and fail
31+
# red. Same-repo branches matching these prefixes only come from the tooling.
2832
if: >
2933
github.event.pull_request.merged == true &&
34+
github.event.pull_request.head.repo.full_name == github.repository &&
3035
(startsWith(github.event.pull_request.head.ref, 'translation-sync-') ||
3136
startsWith(github.event.pull_request.head.ref, 'resync/'))
3237
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)