feat: ship list_pull_requests across all three adapters #2

Merged
ses merged 4 commits from feat/list-pull-requests into main 2026-08-25 14:49:44 +00:00
Owner

Summary

  • Add the first PRD operation — list_pull_requests — across the CLI, MCP server, and OpenCode plugin.
  • Core implementation lives in src/core/listPullRequests.ts; each adapter is a thin translation layer.
  • New tests raise the suite from 21 to 51; all green. bun run lint, bun run typecheck, bun run test, bun run build are clean.

Why

  • docs/PRD.md lists list_pull_requests as the first of three PRD capabilities. The hello-world smoke only shipped get_version, which is not in PRD scope.
  • One commit per Red/Green/Refactor cycle, mirroring the existing get_version plumbing, so each commit is reviewable in isolation.

Verification

  • bun run lint — clean.
  • bun run typecheck — clean.
  • bun test — 51 pass / 0 fail / 120 expect() calls across 8 files.
  • bun run builddist/forgejo-mcp produced.
  • CLI smoke: ./dist/forgejo-mcp help lists the new list-pull-requests subcommand.

Out of scope

  • get_pull_request and create_pull_request (next two PRD operations, separate PRs each).
  • Cwd-inference wiring on the CLI — src/shared/cwd.ts is still a stub per docs/ARCHITECTURE.md:50. The CLI subcommand is flag-only this round.
  • Real cwd.ts implementation — same reason.
  • Write-guard flag — not needed for a read operation.
## Summary - Add the first PRD operation — `list_pull_requests` — across the CLI, MCP server, and OpenCode plugin. - Core implementation lives in `src/core/listPullRequests.ts`; each adapter is a thin translation layer. - New tests raise the suite from 21 to 51; all green. `bun run lint`, `bun run typecheck`, `bun run test`, `bun run build` are clean. ## Why - `docs/PRD.md` lists `list_pull_requests` as the first of three PRD capabilities. The hello-world smoke only shipped `get_version`, which is not in PRD scope. - One commit per Red/Green/Refactor cycle, mirroring the existing `get_version` plumbing, so each commit is reviewable in isolation. ## Verification - `bun run lint` — clean. - `bun run typecheck` — clean. - `bun test` — 51 pass / 0 fail / 120 expect() calls across 8 files. - `bun run build` — `dist/forgejo-mcp` produced. - CLI smoke: `./dist/forgejo-mcp help` lists the new `list-pull-requests` subcommand. ## Out of scope - `get_pull_request` and `create_pull_request` (next two PRD operations, separate PRs each). - Cwd-inference wiring on the CLI — `src/shared/cwd.ts` is still a stub per `docs/ARCHITECTURE.md:50`. The CLI subcommand is flag-only this round. - Real `cwd.ts` implementation — same reason. - Write-guard flag — not needed for a read operation.
ses merged commit e202283d27 into main 2026-08-25 14:49:44 +00:00
ses deleted branch feat/list-pull-requests 2026-08-25 14:49:44 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sebatec-eu/forgejoctl!2
No description provided.