github-mcp-server pins merge_pull_request with expectedHeadSha
Introduced 2026-09-03 · score 0.98
HOW TO USE IT
When merging a pull request only if its head still matches a known commit, call `merge_pull_request` with that commit’s SHA in `expectedHeadSha`.
{"owner":"<owner>","repo":"<repo>","pullNumber":<pull_number>,"expectedHeadSha":"<expected_head_sha>"}WHY THIS HELPS
Merge a pull request only if its head still matches the expected commit.
REQUIREMENTS AND LIMITATIONS
- Version: v1.12.0
- owner (required): Repository owner.
- repo (required): Repository name.
- pullNumber (required): Pull request number.
- expectedHeadSha: Expected SHA of the pull request’s HEAD ref.
- commit_message: Extra detail for the merge commit.
- commit_title: Title for the merge commit.
- merge_method: Merge method.
- Prerequisite: The tool requires OAuth challenge scope `repo`.
- The release does not specify the behavior when the expected head SHA does not match.
FIRST-PARTY EVIDENCE
- https://github.com/github/github-mcp-server/releases/tag/v1.12.0
- https://github.com/github/github-mcp-server/blob/v1.12.0/README.md
Check the installed version and the source before using it. Entry JSON