github / github/github-mcp-server

Use GitHub-signed commits for repository file write tools

オープン
#2,771 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Go
スター
33k
フォーク
5k
平均マージ
2日 1時間
マージ済み PR(30日)
52

説明

## Summary

Repository write tools such as `create_or_update_file` and `push_files` can create unsigned commits. In repositories that require verified commit signatures, the MCP-created pull request is then blocked with:

> Commits must have verified signatures.

## Reproduction

1. Use the MCP server against a repository with a ruleset/branch protection rule requiring signed commits.
2. Create a branch.
3. Use `create_or_update_file` or `push_files` to write a commit.
4. Open a pull request.

## Actual behavior

The commit can be reported by GitHub as `verification.verified=false` with `verification.reason=unsigned`, and the pull request cannot be merged while the signed-commit rule is active.

## Expected behavior

Repository write tools should use a GitHub API path that can produce GitHub-verified commits when supported by the authenticated actor, so MCP-generated pull requests can satisfy signed-commit requirements without clients managing GPG or SSH signing keys.

## Notes

I verified in an internal test repository that switching the file write to GraphQL `createCommitOnBranch` produced a commit with:

- `verification.verified=true`
- `verification.reason=valid`

The existing `delete_file` implementation already avoids the simpler REST contents deletion path because of commit signing behavior. The same issue can affect create/update and multi-file writes.

## Proposed fix

Use GraphQL `createCommitOnBranch` for `create_or_update_file` and `push_files`, keeping the existing tool inputs and response shape as much as possible.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with the implementations of create_or_update_file and push_files, then compare them with the existing delete_file path and its use of GitHub APIs. Investigate GraphQL createCommitOnBranch and preserve the existing tool inputs and response shape. Done means writes produce GitHub-verified commits when supported and pull requests satisfy signed-commit requirements.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
go, graphql
領域
api, backend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
68/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。