Use GitHub-signed commits for repository file write tools

Abierto
#2,771 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
go, graphql
Área
api, backend

Línea de trabajo

Comienza con las implementaciones de create_or_update_file y push_files, y luego compáralas con la ruta existente de delete_file y su uso de las API de GitHub. Investiga GraphQL createCommitOnBranch y conserva las entradas de las herramientas existentes y la forma de la respuesta. La tarea está terminada cuando las escrituras produzcan commits verificados por GitHub cuando sea compatible y las pull requests cumplan los requisitos de commits firmados.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Go
Estrellas
33.1k
Forks
5k
Merge medio
2 d 15 h
PR fusionados (30 d)
27

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de github/github-mcp-server

Todos los issues de github/github-mcp-server

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.