Support standalone inline PR review comments

Abierto
#3,485 3 comentarios 2 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
github, go

Línea de trabajo

Start by reading the existing pull request review and comment tool implementations and their tests to see how they handle GitHub API parameters and validation. Then compare that workflow with the REST endpoint described in the issue. Done means a tool can create a standalone inline comment with the listed location parameters, without creating or submitting a review.

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

Descripción

enhancement
Describe the feature or problem you'd like to solve

GitHub's UI allows posting an inline PR comment using "Add single comment", without starting or submitting a pull request review.

With github-mcp-server, the currently supported workflow for inline comments appears to be review-oriented:

  1. Create a pending review
  2. Add comments using add_comment_to_pending_review
  3. Submit the review

This makes sense when an agent is performing a complete code review, but not every inline observation necessarily represents a review.

For example, an agent may simply want to leave a comment such as:

Consider extracting this into a separate method.

on a specific line and continue its workflow.

Currently, doing this requires creating and subsequently submitting a review, which introduces additional state and has different semantics from GitHub's native "Add single comment" functionality.

Proposed solution

Expose a tool for creating a standalone inline pull request review comment, for example:

create_pull_request_review_comment

The tool could map to GitHub's existing REST API:

POST /repos/{owner}/{repo}/pulls/{pull_number}/comments

and accept the corresponding parameters such as:

  • repository
  • pull request number
  • comment body
  • commit SHA
  • file path
  • line / side
  • optional start line / start side for multi-line comments

This would allow both workflows:

  • Standalone inline comment — equivalent to GitHub's "Add single comment"
  • Pending review comments — comments intentionally grouped into a review
Example prompts or workflows (for tools/toolsets only)

An agent inspecting a PR notices one localized issue and wants to comment directly on the relevant line:

This timeout is hard-coded. Should this use the configured request timeout instead?

The desired behavior would be to publish that comment immediately on the relevant line, without creating a pending review or requiring a subsequent review submission.

Additional context

I noticed that github-mcp-server explicitly supports and encourages the pending-review workflow, so the absence of standalone inline comments may be an intentional design decision.

If so, it would be useful to understand whether there is a technical, security, or agent-workflow reason for not exposing GitHub's standalone inline-comment API.

This request is not intended to change or replace add_comment_to_pending_review. It is about exposing the separate GitHub capability for cases where an agent wants to publish an individual inline comment without creating a review.

Lenguaje dominante
Go
Estrellas
34.4k
Forks
5.3k
Merge medio
3 d 10 h
PR fusionados (30 d)
11

Preparar el entorno

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.