Skip to content

[Fix] All-repository automations fail to start after a second GitHub org is installed - #3624

Merged
mrubens merged 1 commit into
developfrom
fix/github-token-span-all-repositories
Oct 29, 2026
Merged

mrubens merged 1 commit into
developfrom
fix/github-token-span-all-repositories

Conversation

@mrubens

@mrubens mrubens commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Problem

#3613 let runs without an environment fall back to their own repository's GitHub installation when their stamped repositories span installations. All-repository runs (for example custom automations scoped to every repository) have no repository of their own (repo: __all_repositories__), so they still threw GitHubInstallationSpanError and failed to start with a source-control token error.

Change

When an all-repository run without an environment spans installations, anchor the primary token on the deployment's oldest active installation among the stamped repositories, the same installation unconnected reads already use. With #3614, repositories on the other installations still get their own per-repository git credentials.

Validation

  • @roomote/github task-run-token.test.ts (26 passed, new all-repository case)
  • @roomote/github type check

@roomote-community

roomote-community Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

No code issues found. See session

Reviewed installation selection, stamped-repository token scoping, worker per-repository credentials, and the regression test. Current-head tests, lint, type checks, and Knip passed; Docker build, upgrade compatibility, and JavaScript/TypeScript CodeQL were still running when checked.

Reviewed 27c08f8

@mrubens
mrubens merged commit 5acbbad into develop Oct 29, 2026
21 checks passed
@mrubens
mrubens deleted the fix/github-token-span-all-repositories branch October 29, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant