examples: rebase job requires a same-repo head branch - #130
Merged
Conversation
Copilot hardening suggestion from the estate PAT rollout (lecture-python-programming.fr#17). Fork PRs never receive secrets, so the PAT was not exposed — but a merged fork PR whose branch happened to match a translation prefix would start the job with an empty token and fail red. The head-repo check skips it instead. Belt-and-braces plus noise elimination, now that the template's token line is expected to carry a PAT in this org (action-translation#125). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 21, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens the example “Rebase Translation PRs” workflow so it only runs for merged translation PRs whose head branch is in the same repository, preventing runs on merged fork PRs that can’t access secrets and would otherwise fail due to an empty token.
Changes:
- Add a same-repo guard (
head.repo.full_name == github.repository) to the job-levelif:condition. - Expand inline documentation explaining why the additional guard exists (fork PR secret unavailability and failure mode).
This was referenced Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copilot hardening suggestion from the estate PAT rollout (.fr#17 comment). Fork PRs never receive secrets — the PAT was not exposed — but a merged fork PR whose branch happened to match a translation prefix would start the rebase job with an empty token and fail red. The head-repo check skips it instead. Applied simultaneously to both harness targets and all five estate copies so the template and its copies stay in step.
🤖 Generated with Claude Code