Closes backlog item 4: Rithub (apps/gitea, live at git.ereboslab.com) had
zero discovery or signup surface. A signed-in Console session now
provisions a dedicated Gitea user, private org and first repo in one call
(lib/gitea.ts, admin API with sudo= impersonation), via a new public
/rithub landing page and POST /api/v1/rithub/provision route. Signed out,
the CTA goes through the same cross-sell sign-in bridge as items 1/2;
signed in, it closes the loop item 5's OIDC provider opened ("one sign-in,
not a second account").
Verified against a real gitea/gitea:1.23 container: user/org/repo creation,
sudo impersonation, slug-collision retries and the route's idempotency
check all confirmed live. tsc clean, npm test 167/167, npm run test:bundle
3/3 (including a full client build).
13 lines
617 B
SQL
13 lines
617 B
SQL
-- Rithub self-serve provisioning (backlog item 4): a signed-in Console org
|
|
-- gets its own Gitea user account, a private org and a first repo with one
|
|
-- click, instead of a separate native Gitea signup. Nullable: orgs created
|
|
-- before this ship, or while GITEA_API_URL/GITEA_ADMIN_TOKEN are unset,
|
|
-- simply have none yet.
|
|
|
|
alter table railyard.orgs
|
|
add column if not exists gitea_username text,
|
|
add column if not exists gitea_org_slug text,
|
|
add column if not exists gitea_repo_url text;
|
|
|
|
create index if not exists orgs_gitea_username_idx on railyard.orgs (gitea_username) where gitea_username is not null;
|