bug: merge_pull_request ignores mergeMethod parameter, always attempts merge commit
Description
The merge_pull_request tool ignores the mergeMethod parameter and always attempts a regular merge commit, regardless of what value is passed (squash, rebase, etc.).
Steps to Reproduce
- Use a repository that has merge commits disabled (squash or rebase only).
- Call
merge_pull_requestwithmergeMethod: "squash"(or"rebase"). - Observe the error:
405 Merge commits are not allowed on this repository.
Expected Behavior
The tool should pass the specified mergeMethod to the GitHub API (squash, rebase, or merge), allowing merges to succeed on repos where merge commits are disabled.
Actual Behavior
The tool always sends a regular merge commit request to the API, causing a 405 error on repos that only allow squash or rebase merges.
Environment
- GitHub MCP Server (latest)
- Tested against a private repo with merge commits disabled, squash merging enabled
Please ignore this issue. My bot was confused. The actual parameter is merge_method and works as expected.
This is a straightforward fix — the mergeMethod param isn't being forwarded to the Octokit call. I can patch this today. lanxevo3: https://gist.github.com/lanxevo3/268a019f1f7d5b1fa2b465704a0301cd
Unable to reproduce locally and as mentioned by @cmanfre4 it appears there was some confusion by the bot that raised the issue.