Add GITHUB_PAT for enterprise-level runner registration - #71
Merged
Conversation
existemi
marked this pull request as ready for review
August 19, 2026 02:30
ispasov
approved these changes
Aug 19, 2026
ispasov
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. The PAT-vs-App auth selection is clean, the enterprise-URL-without-PAT guard gives a clear actionable error, precedence is documented, and the IsEnterpriseConfigURL table tests cover the edge cases (trailing slash, mixed case, repo-named-"enterprises", missing name). Verified the env refactor relocated the Orka token/config/metadata validations into validateEnv rather than dropping them.
existemi
force-pushed
the
rl/github-pat
branch
from
August 19, 2026 16:49
601dffd to
b1e4dec
Compare
existemi
force-pushed
the
rl/github-pat
branch
from
August 20, 2026 14:53
b1e4dec to
1fa3940
Compare
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.
Description
Add
GITHUB_PATso runners can be registered at the enterprise level.GitHub does not grant the
manage_runners:enterprisepermission to GitHub App installations, so an App-authenticated request to the enterprise registration-token endpoint is rejected with403 Resource not accessible by integrationno matter where the App is installed. A classic personal access token is the only supported way to register runners at the enterprise level, which is the same limitation the Actions Runner Controller documents.GITHUB_PAT, which selects the SDK's personal access token client instead of the GitHub App clientGITHUB_APP_*variables optional whenGITHUB_PATis set, and log which authentication method is in useGITHUB_URLpoints at an enterprise and no PAT is provided, rather than surfacing a bare403from the registration callParseEnvandvalidateEnv, which printed each of those errors twiceThe token must be a classic token with the
admin:enterprise(manage_runners:enterprise) scope, owned by an enterprise owner. Fine-grained tokens do not expose enterprise scopes.Testing
GITHUB_URLpointing at an enterprise andGITHUB_PATset. The runner authenticates, creates the runner scale set, and begins processing messages.GITHUB_URLand noGITHUB_PAT. Startup fails with a message naming the required token and scope.GITHUB_PATset and noGITHUB_APP_*variables present at all. Startup succeeds and the log reports that the personal access token is in use.GITHUB_PATnor anyGITHUB_APP_*variable. Startup fails with one message naming both authentication options.