Slice 10: create_pr (open a pull request)

forge CreatePullRequest (Gitea; empty base resolves to the repo default branch). Service CreatePR records a pr-created event. HTTP POST /api/repo/pr/create; MCP tool create_pr; <pr-list> New pull request button (head = selected repo current branch, base = default). Live-tested end-to-end: app create_pr opened a real PR (base auto-resolved), listed, then cleaned up; main untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-09-20 17:34:13 -04:00
parent e1999bcf21
commit ad00654487
10 changed files with 149 additions and 7 deletions
+2 -2
View File
@@ -366,8 +366,8 @@ obeys the safety rules (§1.4).
- Read: `list_repos`, `get_repo`, `get_active_project`, `get_activity`,
`get_pending_switch`, `list_prs`.
- Act: `git_fetch`, `git_pull`, `git_push`, `git_commit`, `git_checkout`,
`create_branch`, `git_discard_changes`, `merge_and_cleanup_pr`,
`set_active_project`, `ack_switch`. (More — `create_pr` — as they land.)
`create_branch`, `git_discard_changes`, `create_pr`, `merge_and_cleanup_pr`,
`set_active_project`, `ack_switch`.
- **A tool's result type must be a struct, never a bare slice/map/scalar.** The
go-sdk infers each tool's `outputSchema` from its handler's result type, and MCP
structured output must be a JSON **object** (`type: "object"`). A handler that