feat(repos): add install-status endpoint to unblock repo registration#203
Merged
Conversation
1d8464b to
75dbfaf
Compare
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.
75dbfaf to
fb5b9ec
Compare
entrius
approved these changes
Jul 2, 2026
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.
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'srepos[]list.Since #180 narrowed
/healthto repos that are installed ANDregistered = 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:
registeredonly flips totruevia 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:installedistruewhen an installation row exists with a non-nullinstallation_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:
installed=false, not a 404 (mirrors the maintainers endpoint's convention).Follow-up
The UI change to call this endpoint instead of scanning
/healthis in a companion gittensor-ui PR.Testing
npm run build,npm run lint, andprettier --checkall pass.