chore: remove PR_TOKEN usage from update-latest-build-version workflow#30431
Conversation
…and inherit in build yml
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7995b89. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
These changes are purely infrastructure/CI authentication changes. They do not affect:
No E2E tests need to run for these changes. The risk is low — the change is a straightforward token migration that maintains backwards compatibility. Performance Test Selection: |
|




Description
PR #30402 removed
PR_TOKENfrom branch creation and cleanup steps in build workflows, since Patroll rotates it every ~30 minutes and stale tokens were causing intermittent failures. However,update-latest-build-version.ymlstill usedtoken: ${{ secrets.PR_TOKEN || github.token }}for its checkout and version-bump push steps.Because
PR_TOKENis captured as a non-empty string at workflow start and then revoked mid-run by Patroll, the||fallback togithub.tokennever triggered — the revoked PAT was silently passed toactions/checkout, causing intermittent:This PR completes the cleanup started in #30402:
update-latest-build-version.yml: Changestoken:to always usegithub.token. ThePR_TOKENsecret declaration is kept asrequired: false(with a deprecation note) so existing callers (build-rc-auto.yml,runway-rc-builds.yml,runway-production-builds.yml) that still pass it explicitly continue to work — GitHub raises a validation error if a caller passes a secret not declared in the called workflow. Those callers can be cleaned up in a follow-up.build.yml: Replaces the explicitsecrets: { PR_TOKEN: ${{ secrets.PR_TOKEN }} }mapping (which propagated the potentially-stale token) withsecrets: inherit, consistent with every other reusable workflow call in the chain.github.tokenis immune to Patroll rotation — it is a GitHub App installation token auto-provisioned per-job with a 6-hour TTL, not a PAT stored as a repo secret.Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MCWP-613
Manual testing steps
N/A
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist