pull_request_read drops merge_commit_sha
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
Research direction
Start in pkg/github/pullrequests.go, reading GetPullRequest, convertToMinimalPullRequest, and MinimalPullRequest. Add support for retaining the merge commit SHA, then verify that pull_request_read with method get exposes merge_commit_sha for merged pull requests.
Written by the indexing model from the issue text.
Description
Describe the bug
pull_request_read with method: get does not return the pull request's merge_commit_sha, so there is no way to get from a merged pull request to the commit the merge produced without a second call.
In the source, GetPullRequest fetches the full pull request and then returns convertToMinimalPullRequest(pr). MinimalPullRequest carries merged, merged_at, merged_by, head and base, but has no merge_commit_sha field, so the value is dropped during conversion. merge_commit does not appear anywhere in pkg/github/pullrequests.go.
Affected version
Unknown. Observed through a hosted GitHub MCP integration on 2026-09-06, where the server version is not exposed to me. The code references above are from the repository's default branch on that date and may not match the build that was serving the request.
Steps to reproduce the behavior
- Call
pull_request_readwithmethod: getfor a merged pull request. - Inspect the returned object.
Expected vs actual behavior
Expected: merge_commit_sha is present for a merged pull request, as the REST API returns it.
Actual: the field is absent. Callers fall back to listing commits and matching on merge time or on the pull request number in the commit message, both of which are unreliable on an active branch.
Logs
None captured beyond the returned object.
- Dominant language
- Go
- Stars
- 33.1k
- Forks
- 5k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 27
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/github-mcp-server
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 88/100
github/github-mcp-server#3042 · 2 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/github-mcp-server#3032 · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
github/github-mcp-server#2803 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
github/github-mcp-server#2740 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
github/github-mcp-server#2661 · 1 comment ·
All issues in github/github-mcp-server
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100