Skip to content

feat(api): add repo maintainers endpoint#104

Merged
entrius merged 1 commit into
testfrom
feat/maintainer-roles-endpoint
May 16, 2026
Merged

feat(api): add repo maintainers endpoint#104
entrius merged 1 commit into
testfrom
feat/maintainer-roles-endpoint

Conversation

@anderdc
Copy link
Copy Markdown
Collaborator

@anderdc anderdc commented May 16, 2026

What

Adds GET /api/v1/repos/:owner/:repo/maintainers — returns users whose latest known GitHub association for the repo is OWNER, MEMBER, or COLLABORATOR.

  • New ReposController / ReposService (registered in api.module.ts), following the pulls/ two-segment repo-param pattern.
  • Reads the existing contributor_repo_roles view — no new table, no migration, no new GitHub App permission.
  • An unknown repo returns an empty maintainers list (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_cut emission carve-out to maintainer miner neurons. The association literals are kept in sync with gittensor constants.py MAINTAINER_ASSOCIATIONS.

Verification

npm run build, npm run lint, npm run format:check all pass. (Repo has no test framework configured.)

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 entrius merged commit c84bad0 into test May 16, 2026
2 checks passed
@entrius entrius deleted the feat/maintainer-roles-endpoint branch May 16, 2026 19:25
@anderdc anderdc mentioned this pull request May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants