Skip to content

REST + CLI mirror for loopover_refresh_repo_docs #6743

Description

@JSONbored

Context

The MCP tool loopover_refresh_repo_docs (src/mcp/server.ts:2535, via refreshRepoDocs at src/mcp/server.ts:4213-4227, requireRepoManageAccess-gated) calls performRepoDocRefresh (src/github/repo-doc-refresh-runner.ts), opening or finding the already-open repo-doc PR. No REST route exists for this (confirmed via grep for performRepoDocRefresh — only the MCP tool calls it), and no CLI mirror exists.

Requirements

  • Add POST /v1/repos/:owner/:repo/repo-docs/refresh in src/api/routes.ts, maintainer-write-gated (requireRepoWriteAccess), calling the same performRepoDocRefresh.
  • Add maintain refresh-docs --repo owner/repo CLI subcommand.

Deliverables

  • POST /v1/repos/:owner/:repo/repo-docs/refresh route
  • maintain refresh-docs CLI subcommand
  • Unit test

Test Coverage Requirements

99%+ Codecov patch coverage on every changed line and branch in the new route/tool/CLI code, plus a test asserting output parity between the mirrored surfaces for identical input.

Expected Outcome

A maintainer can trigger a repo-doc refresh over REST/CLI, not just via the MCP tool.

Links & Resources

Precedent: app.post("/v1/repos/:owner/:repo/agent/pending-actions/:id/:decision", ...) at src/api/routes.ts:2593 as the maintainer-write REST precedent, and maintain approve/reject (loopover-mcp.js:2753-2760) as the CLI-write precedent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions