feat(pr): add get_pull_request and create_pull_request across all three adapters #3

Merged
ses merged 6 commits from feat/pr-get-and-create into main 2026-08-25 16:01:37 +00:00
Owner

Summary

  • get_pull_request (GET .../pulls/{index}) and create_pull_request (POST .../pulls) shipped across CLI, MCP, and OpenCode adapter, backed by one core call against the Forgejo REST API.
  • CLI restructured to nested subcommands mirroring fgj/gh (version, pr list, pr view <n>, pr create); adds -R owner/repo, -s, -t, -b, -H, -B flags.
  • Real cwd inference from git remote get-url origin — works in plain checkouts and linked worktrees (where .git is a file containing gitdir:).
  • PRD updated: dropped the confirm/confirm_title write-guard from the create_pull_request signature (YAGNI).

Commits

  1. feat(core): add getPullRequest
  2. feat(core): add createPullRequest
  3. feat(shared): real cwd inference from git origin remote (worktree-aware)
  4. feat(cli): restructure to nested subcommands with cwd inference and fgj-style flags
  5. feat(adapters): wire get_pull_request into MCP and OpenCode
  6. feat(adapters+prd): wire create_pull_request into MCP and OpenCode; drop confirm from PRD

Breaking Changes

  • CLI subcommand schema: list-pull-requests -> pr list, get-version -> version. New pr view <n> and pr create subcommands.
  • PRD: create_pull_request no longer takes confirm: true / confirm_title; the process-level write-guard constraint and success criterion are removed.

Verification

  • bun run lint, bun run typecheck, bun run build, ./dist/forgejo-mcp help: green.
  • 122 tests pass / 0 fail (260 expect calls across 10 files).
  • Local bun test ran with BUN_MAX_WORKERS=1 due to sandbox resource limits; CI on debian-testing runs in parallel.

Out of Scope (PRD)

PR diffs, reviews, merge, comments, labels, milestones; issues; repositories; releases; per-process secret ACL.

## Summary - `get_pull_request` (GET .../pulls/{index}) and `create_pull_request` (POST .../pulls) shipped across CLI, MCP, and OpenCode adapter, backed by one core call against the Forgejo REST API. - CLI restructured to nested subcommands mirroring `fgj`/`gh` (`version`, `pr list`, `pr view <n>`, `pr create`); adds `-R owner/repo`, `-s`, `-t`, `-b`, `-H`, `-B` flags. - Real cwd inference from `git remote get-url origin` — works in plain checkouts and linked worktrees (where `.git` is a file containing `gitdir:`). - PRD updated: dropped the `confirm`/`confirm_title` write-guard from the `create_pull_request` signature (YAGNI). ## Commits 1. `feat(core): add getPullRequest` 2. `feat(core): add createPullRequest` 3. `feat(shared): real cwd inference from git origin remote (worktree-aware)` 4. `feat(cli): restructure to nested subcommands with cwd inference and fgj-style flags` 5. `feat(adapters): wire get_pull_request into MCP and OpenCode` 6. `feat(adapters+prd): wire create_pull_request into MCP and OpenCode; drop confirm from PRD` ## Breaking Changes - CLI subcommand schema: `list-pull-requests` -> `pr list`, `get-version` -> `version`. New `pr view <n>` and `pr create` subcommands. - PRD: `create_pull_request` no longer takes `confirm: true` / `confirm_title`; the process-level write-guard constraint and success criterion are removed. ## Verification - `bun run lint`, `bun run typecheck`, `bun run build`, `./dist/forgejo-mcp help`: green. - 122 tests pass / 0 fail (260 expect calls across 10 files). - Local `bun test` ran with `BUN_MAX_WORKERS=1` due to sandbox resource limits; CI on `debian-testing` runs in parallel. ## Out of Scope (PRD) PR diffs, reviews, merge, comments, labels, milestones; issues; repositories; releases; per-process secret ACL.
ses merged commit 049b5ad097 into main 2026-08-25 16:01:37 +00:00
ses deleted branch feat/pr-get-and-create 2026-08-25 16:01:37 +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!3
No description provided.