Skip to content

feat(repos): add install-status endpoint to unblock repo registration#203

Merged
entrius merged 1 commit into
testfrom
feat/repo-installation-status
Jul 2, 2026
Merged

feat(repos): add install-status endpoint to unblock repo registration#203
entrius merged 1 commit into
testfrom
feat/repo-installation-status

Conversation

@anderdc

@anderdc anderdc commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Problem

The repo registration UI (Step 2 — "Tell us about the repo") verifies that the Gittensor Mirror App is installed on a repo by looking the repo up in GET /api/v1/health's repos[] list.

Since #180 narrowed /health to repos that are installed AND registered = true, a freshly-installed-but-unregistered repo — which is exactly the state the registration page is meant to handle — no longer appears in /health. So the UI wrongly shows "We don't see the Gittensor Mirror App installed on this repository."

This is a chicken-and-egg deadlock: registered only flips to true via the admin register step, but the UI's install gate (which precedes registration) now requires the repo to already be registered. New repos can't get past Step 2.

Fix

Add a small read-only endpoint that answers the question the registration gate actually asks — is the app installed? — independent of registered:

GET /api/v1/repos/:owner/:repo/installation  →  { repo_full_name, installed }

installed is true when an installation row exists with a non-null installation_id. This leaves #180's health-monitoring behavior untouched (health stays "actively tracked repos"); it just restores install-only semantics for the registration gate.

Notes:

Follow-up

The UI change to call this endpoint instead of scanning /health is in a companion gittensor-ui PR.

Testing

  • npm run build, npm run lint, and prettier --check all pass.

@anderdc anderdc force-pushed the feat/repo-installation-status branch from 1d8464b to 75dbfaf Compare July 2, 2026 17:56
Add a read-only endpoint that reports whether the Gittensor Mirror GitHub
App is installed on a repo (installation_id present), independent of the
"registered" flag.

The registration UI verifies the install step (Step 2) by looking a repo
up in GET /api/v1/health. Since #180 narrowed /health to installed AND
registered repos, a freshly-installed-but-unregistered repo — exactly the
state the registration page handles — no longer appears there, so the UI
wrongly reports "App not installed". Registration is a chicken-and-egg
deadlock: the install gate now requires the repo to already be registered.

This endpoint restores install-only semantics for that gate without
touching #180's health-monitoring behavior. Matches owner/repo
case-insensitively (#120). Unknown repo returns installed=false, not 404.
@anderdc anderdc force-pushed the feat/repo-installation-status branch from 75dbfaf to fb5b9ec Compare July 2, 2026 17:57
@entrius entrius merged commit 7c4caaa into test Jul 2, 2026
3 checks passed
@entrius entrius deleted the feat/repo-installation-status branch July 2, 2026 18:02
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.

2 participants