Connect to GitHub from onboarding and the host picker #86
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Even with the adapter built, nobody can pick GitHub: onboarding lists it as "coming soon", connecting rejects the type, and the sign-in screen gives Forgejo's token page and scopes. Parent: #83. Depends on #84; pick this up after #84 merges.
Acceptance criteria
https://github.comfor GitHub, and accepts a GitHub Enterprise address (design.md → Onboarding step 3; ticket #83).<web root>/settings/tokensand lists GitHub's permissions: classic token scoperepo(or a fine-grained token with Contents, Pull requests and Issues read/write, plus Actions, Checks and Commit statuses read), each with what it's for. Failure messages name GitHub's scopes, not Forgejo's (design.md → Onboarding step 4: "links to the page where a token is created … and lists the permissions it needs").type = "github"in the config connects, from the picker,--hostor Settings → add host (design.md → Settings; architecture.md config example).docs/design.mdv1 scope records that the GitHub adapter ships with the public release (the PM's call in #83), and the README lists GitHub as supported.Plan
cmd/lazyforge/main.go:connectdispatches onh.Type, sendinggithubtogithub.New.Deps.Probekeeps its signature. cmd composes it so it tries the gitea probe, then the GitHub probe, and returns the first kind found, orErrNotFoundwhen neither answers.uistill never imports an adapter (architecture.md → UI).internal/ui/onboarding.go: raiseselectableForgesto 3. Pre-fill the address when the kind is GitHub. Make the token help, scope list,signInErrortext and the "No … API" message depend on the kind (a small per-kind table in onboarding).Update/Viewtests for the GitHub path (pre-fill, scope text, kind mismatch), and a cmd test thatconnectroutesgithub. Verify in tmux at 80x24 per architecture.md → UI.Context
internal/ui/onboarding.go(forgeRows,selectableForges,submit,probed,signInError,view). App deps:internal/ui/app.go(Deps.Probe,Deps.Connect).github(internal/config/config.gohostTypes).gh auth tokenworks as atoken_cmd. Its OAuth token carriesrepoandread:org(verified 2026-10-09).Out of scope
The adapter itself (#84, #85). GitLab.
🤖 merged: #90