feat(github): serve multiple GitHub owners, each with its own auth#120
Merged
Conversation
ephemerd could only serve one GitHub owner (a single [github] with one
owner + one credential). This adds [[github_extra]] targets so one daemon
can serve several owners at once, each with independent auth — e.g. an org
via a GitHub App and a personal account via a PAT.
- config: GitHubExtra []GitHubConfig + GitHubTargets() normalizer (primary
[github] followed by [[github_extra]]) + per-target validation. The single
[github] form is unchanged.
- initProviders: build one self-contained GitHub provider per target (App or
PAT), appended to the existing provider list. Each provider polls/registers
only its owner's repos and registers JIT runners with its own credential,
so the scheduler routes jobs per owner with no cross-owner surgery.
- webhook mode: give each provider a stable, unique webhook path. Normally
"/webhook/github"; with multiple GitHub targets it disambiguates by owner
("/webhook/github/<owner>") so they never collide on the mux or webhook URL.
Single-target deployments keep the plain path (no change on upgrade).
Verified live in poll mode: one config with an org (App) + a personal
account (PAT) authenticated to both and discovered a queued job only in the
matching owner's repo.
luthermonson
force-pushed
the
feat/multi-target-github
branch
from
July 16, 2026 00:06
17ffe0d to
b9e7be8
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.
Summary
ephemerd could only serve one GitHub owner — a single
[github]block with one owner + one credential. This lets a single daemon serve multiple owners at once, each with its own auth (e.g. an org via a GitHub App and a personal account via a PAT), so one runner can process jobs across accounts.How
The scheduler already handles a list of providers, and each GitHub
Clientis fully self-contained per owner — so this needs no owner-routing surgery inside the client:GitHubExtra []GitHubConfig+GitHubTargets()(primary[github]then[[github_extra]]) + per-target validation. Single[github]is unchanged.GitHubTargets(), building one provider per target (App or PAT). Each polls/registers only its owner's repos and registers JIT runners with its own credential./webhook/github, disambiguated to/webhook/github/<owner>only when multiple GitHub targets exist. Single-target deployments keep the plain path (no change on upgrade).Testing
pkg/configtests forGitHubTargets()+ multi-target validation;pkg/config,pkg/github,pkg/providers/github,pkg/schedulerall compile.ephpm(App) +luthermonson(PAT) authenticated to both; a self-hosted job queued in the privateluthermonson/card-cannonwas discovered only under the luthermonson target, while the ephpm (App) target correctly ignored it.Notes
[[github_extra]]into runner configs.