feat(api): add repo maintainers endpoint#104
Merged
Merged
Conversation
Add GET /api/v1/repos/:owner/:repo/maintainers, returning users whose latest known association for the repo is OWNER, MEMBER, or COLLABORATOR. Reads the existing contributor_repo_roles view — no new table or GitHub API permission. An unknown repo returns an empty maintainers list. Consumed by the gittensor validator to route the per-repo maintainer_cut emission carve-out.
entrius
approved these changes
May 16, 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.
What
Adds
GET /api/v1/repos/:owner/:repo/maintainers— returns users whose latest known GitHub association for the repo isOWNER,MEMBER, orCOLLABORATOR.ReposController/ReposService(registered inapi.module.ts), following thepulls/two-segment repo-param pattern.contributor_repo_rolesview — no new table, no migration, no new GitHub App permission.maintainerslist (not a 404).Response shape:
{ "repo_full_name": "entrius/gittensor", "generated_at": "2026-05-16T...", "maintainers": [ { "github_id": "12345", "login": "alice", "association": "OWNER" } ] }Why
Consumed by the gittensor validator to route the new per-repo
maintainer_cutemission carve-out to maintainer miner neurons. The association literals are kept in sync with gittensorconstants.pyMAINTAINER_ASSOCIATIONS.Verification
npm run build,npm run lint,npm run format:checkall pass. (Repo has no test framework configured.)