Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Schema Inaccuracy] `X-GitHub-Hook-Installation-Target-Type` and `X-GitHub-Hook-Installation-Target-Id` are insufficiently documented (and incorrect)

Abierto
#7,210 0 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
openapi
Área
api

Línea de trabajo

Comienza con las dos entradas del esquema de encabezados de webhook incluidas en este issue y compáralas con la documentación vinculada de delivery-headers y los informes anteriores. Verifica los valores válidos de Target-Type y la correspondencia de Target-Id para cada una, y luego actualiza los tipos y las descripciones del esquema para que los valores y los identificadores documentados sean precisos.

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

Descripción

feature

Schema Inaccuracy

The schema for these two webhook headers only specifies:

          {
            "name": "X-Github-Hook-Installation-Target-Id",
            "in": "header",
            "example": 123123,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Github-Hook-Installation-Target-Type",
            "in": "header",
            "example": "repository",
            "schema": {
              "type": "string"
            }
          },

the webhooks documentation is not significantly more helpful:

X-GitHub-Hook-Installation-Target-Type: The type of resource where the webhook was created.
X-GitHub-Hook-Installation-Target-ID: The unique identifier of the resource where the webhook was created.

Issue

While some hooks can be distinguished by probing the payload for optional entries like installation or organization entries, not only is this pretty ugly some events don't have such entries because e.g. they're not attached to installations in the case of github apps hooks (ping, github_app_authorization.revoked).

Currently every developer who needs this information has to reverse-engineer the values and hope they didn't miss special cases.

Expected

  • enumerate the valid values for Target-Type (as far as I can tell there's repository for repository hooks and integration for app hooks, I have never tested org hooks so I've no idea what that uses
  • specify what Target-Id maps to for each type, as far as I can tell for repository it's the repository id and for integration it's the app id
  • also the Target-Id is currently typed as a string, but all of them are numbers (/ integers)

Previous reports

Lenguaje dominante
Sin datos de lenguaje
Estrellas
1.6k
Forks
345
Merge medio
6 h
PR fusionados (30 d)
82

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/rest-api-description

Todos los issues de github/rest-api-description

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.