refactor(pull-requests): migrate consolidated PR tools to typed inputs and outputs - #3396
Draft
SamMorrowDrums wants to merge 1 commit into
Draft
SamMorrowDrums wants to merge 1 commit into
SamMorrowDrums wants to merge 1 commit into
Conversation
…s and outputs Convert pull_request_read, create_pull_request, update_pull_request, merge_pull_request, update_pull_request_branch, pull_request_review_write (both feature variants), add_comment_to_pending_review and add_reply_to_pull_request_comment to NewTool with concrete inputs and output DTOs. Input normalizers replay legacy handler checks so legacy coercions and error text are preserved. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
SamMorrowDrums
added this pull request to stack #3385
October 2, 2026 14:33
7 of 13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves the consolidated pull request tools in
pkg/github/pullrequests.gotoNewTool[In,Out]with concrete inputs and output DTOs. Stacked on #3395.Why
Continues the typed-output stack. Modern-protocol clients get schema-valid
structuredContent, while legacy and unknown protocols get the same output as before.Fixes #
What changed
pull_request_read,create_pull_request,update_pull_request,merge_pull_request,update_pull_request_branch,pull_request_review_write(both the default and the thread-resolution-reason variants),add_comment_to_pending_reviewandadd_reply_to_pull_request_comment.consolidated_pull_request_types.gowith:oneOfunion for thepull_request_readmethods, with a diff variant and a null variant.review_writekeys matched case-insensitively, plus its WeakDecode behaviour;commentIdBigInt and< 1errors;title/head/baseare missing.structuredContentis sent only on 2026-07-28 and omitted on legacy and unknown protocols.typed_consolidated_pull_request_outputs_test.gocover:c918f4b;_typedsnapshots.MCP impact
Prompts tested (tool changes only)
Security / limits
Tool renaming
deprecated_tool_aliases.goNote: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.
Lint & tests
./script/lint— passed (0 issues)./script/test— passedAlso run:
UPDATE_TOOLSNAPS=true go test ./...— passedscript/generate-docs— no doc changesgit diff --check— cleanKnown CI: an inherited macOS flake from #3395 in
typed_granular_issue_outputs_test.go:389(the int64 overflow message differs on macOS).Docs
script/generate-docsproduced no changes.