Repository navigation
feat: add include_patch parameter to get_commit tool - #1924
Merged
SamMorrowDrums merged 1 commit intoJun 1, 2026
Merged
SamMorrowDrums merged 1 commit into
SamMorrowDrums merged 1 commit into
Conversation
voki-gandzhelashvili-t
force-pushed
the
feature/add-patch-to-commit-files
branch
from
January 29, 2026 09:35
df0c3db to
5d9c352
Compare
SamMorrowDrums
force-pushed
the
feature/add-patch-to-commit-files
branch
2 times, most recently
from
June 1, 2026 10:03
af67c6c to
f34baee
Compare
Replace the get_commit tool's two boolean flags (include_diff,
include_patch) with a single detail enum: none / stats / full_patch.
Why:
- The two-boolean shape had an awkward dependency
("include_patch only applies when include_diff is true") and an
impossible state (include_patch=true, include_diff=false) that was
silently ignored.
- A single discriminator collapses three meaningful response shapes
into one orthogonal choice, makes the most expensive option
("full_patch") self-describing, and eliminates the "diff vs patch"
naming confusion.
Behavior:
- Default ("stats") matches the previous default
(include_diff=true, include_patch=false): per-file metadata with no
patch text. Existing callers using defaults are unaffected.
- "none" omits Stats and Files entirely (was include_diff=false).
- "full_patch" is the new opt-in level that adds the unified diff to
each MinimalCommitFile.
Breaking change: callers that previously passed include_diff or
include_patch must switch to detail. Callers using the defaults are
unaffected.
Changes:
- Added Patch field to MinimalCommitFile.
- Added commitDetail type, parseCommitDetail, and migrated
convertToMinimalCommit to take a commitDetail.
- Updated get_commit schema, list_commits caller (commitDetailNone),
unit tests, toolsnap, and README.
Co-authored-by: Sam Morrow <sammorrowdrums@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SamMorrowDrums
force-pushed
the
feature/add-patch-to-commit-files
branch
from
June 1, 2026 10:11
f34baee to
af53280
Compare
SamMorrowDrums
approved these changes
Jun 1, 2026
This was referenced Jun 9, 2026
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
github-mcp-server 1.2.0 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## What's Changed * MCP Apps: align with the 2026-01-26 stable spec by @mattdholloway in github/github-mcp-server#2573 * feat: add create_project and create_iteration_field methods to projects_write by @SamMorrowDrums in github/github-mcp-server#2232 * fix: restore thread id in get_review_comments response by @omid-ant in github/github-mcp-server#2245 * docs: add installation guides for Zed and OpenCode by @jluocsa in github/github-mcp-server#2535 * docs: improve Claude installation guide with Windows PowerShell support by @vincent067 in github/github-mcp-server#2312 * Fix remote-server docs inconsistency regarding toolset at base url by @korobitsin in github/github-mcp-server#2217 * fix: return project item id usable for updates by @njoppi2 in github/github-mcp-server#2169 * fix: add MCP initialize handshake to mcpcurl by @ra-n-dom in github/github-mcp-server#2009 * fix: support team pull request reviewers by @he-yufeng in github/github-mcp-server#2514 * Skip MCP App form when issue/PR write carries non-form params by @mattdholloway in github/github-mcp-server#2589 * feat: add include_patch parameter to get_commit tool by @voki-gandzhelashvili-t in github/github-mcp-server#1924 * MCP Apps: Open created issue/PR link via host open-link capability by @mattdholloway in github/github-mcp-server#2593 * fix: Empty assignees array should clear assignees by @RossTarrant in github/github-mcp-server#2600 * Add confidence parameter to issue mutation MCP tools by @alondahari in github/github-mcp-server#2605 ## New Contributors * @omid-ant made their first contribution in github/github-mcp-server#2245 * @vincent067 made their first contribution in github/github-mcp-server#2312 * @korobitsin made their first contribution in github/github-mcp-server#2217 * @njoppi2 made their first contribution in github/github-mcp-server#2169 * @ra-n-dom made their first contribution in github/github-mcp-server#2009 * @he-yufeng made their first contribution in github/github-mcp-server#2514 * @voki-gandzhelashvili-t made their first contribution in github/github-mcp-server#1924 **Full Changelog**: https://github.com/github/github-mcp-server/compare/v1.1.2...v1.2.0</pre> <p>View the full release notes at <a href="https://github.com/github/github-mcp-server/releases/tag/v1.2.0">https://github.com/github/github-mcp-server/releases/tag/v1.2.0</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!11013
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
This PR adds a new optional parameter
include_patchto theget_committool, allowing users to optionally include the patch/diff content for each file in the response.Key Design Decision: Opt-in Behavior
The patch content is not included by default (
include_patch: false). This is intentional:Changes
Patch stringfield toMinimalCommitFilestructinclude_patchboolean parameter toget_committool (default:false)convertToMinimalCommitfunction to conditionally include patch contentUsage
Example Response with include_patch: true
{ "sha": "abc123...", "files": [{ "filename": "src/example.go", "status": "modified", "additions": 5, "deletions": 2, "changes": 7, "patch": "@@ -10,6 +10,9 @@\n func example() {\n+ // new code\n+ return true\n }" }] }Use Cases
Test Plan