list_issues and search_issues: inconsistent `fields` allow-lists (`html_url` rejected by list)

Abierto Apto para principiantes
#3,960 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
62/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go
Área
api, tooling

Línea de trabajo

Empieza por localizar los esquemas de campos de list_issues y search_issues, así como el error de validación que indica los campos aceptados. Compara sus listas de campos permitidos y, después, revisa las pruebas existentes de cada herramienta. Añade una comprobación para asegurar que sus conjuntos de campos se mantengan sincronizados. El trabajo estará terminado cuando ambas acepten los campos compartidos, incluido html_url, y las pruebas cubran los esquemas coincidentes.

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

Descripción

Describe the bug

list_issues and search_issues return the same kind of object but accept different fields allow-lists. In particular, html_url is accepted by search_issues and rejected by list_issues:

  • search_issues(fields: ["number","title","state","html_url"]) succeeds.
  • list_issues(fields: ["number","title","state","html_url"]) fails with:
    fields[3]: Expected "number" | "title" | "body" | "state" | "user" | "labels" | "assignees" | "comments" | "created_at" | "updated_at" | "field_values"

This forces callers to keep separate field lists for two tools that should be interchangeable, and it turns a simple "list or search, same projection" workflow into a retry. html_url is a standard, useful field (linking issues), so its absence from list_issues is surprising.

Steps to reproduce the behavior
  1. Call search_issues with fields: ["number","title","state","html_url"].
  2. Observe success and html_url in the results.
  3. Call list_issues with the same fields.
  4. Observe the invalid-arguments error above.
Expected vs actual behavior

Expected: both tools accept the same issue-field allow-list, including html_url, or share a single schema/type for issue projections.

Actual: the allow-lists diverge, and a field valid in one tool is invalid in the other.

Proposed solution

Define one shared issue-field schema used by list_issues, search_issues, and (with #3959) issue_read. Include at least:

number, title, state, state_reason, user.login, labels, assignees, milestone, comments, created_at, updated_at, closed_at, html_url, and opt-in body.

Return the allowed field list in validation errors, and add a test that the list/search field sets stay in sync.

Example prompts or workflows (for tools/toolsets only)
  • "List the 30 newest issues with number, title, state, and URL; then run the same query as a search." — same fields argument for both calls.
  • "Build a release-notes table with issue links from either a list or a search."
  • "Switch from search_issues to list_issues when the search rate limit is hit, without rewriting the projection."
Additional context

Related: #3605 (inconsistent parameter names), #3286 (PR response field filtering), #3959 (issue_read field filtering), #2425 (schema descriptions), #2270 (closed: projects_list ignored fields).

Environment: OpenCode 2.4.1, hosted endpoint https://api.githubcopilot.com/mcp/, toolsets repos,issues,pull_requests,actions.

Logs
list_issues fields error:
fields[3]: Expected "number" | "title" | "body" | "state" | "user" | "labels" | "assignees" | "comments" | "created_at" | "updated_at" | "field_values"
Lenguaje dominante
Go
Estrellas
34.8k
Forks
5.4k
Merge medio
3 d 22 h
PR fusionados (30 d)
31

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.