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

InstallationPermissions is missing organization_private_registries

Abierto Apto para principiantes
#4,590 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

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

Línea de trabajo

El issue está en github/apps.go, específicamente en la estructura InstallationPermissions. Revise los campos existentes y su orden. Agregue el campo 'OrganizationPrivateRegistries' con la etiqueta JSON correcta. Verifique consultando la documentación de la API de GitHub para la clave de permiso. Ejecute las pruebas para asegurarse de que la estructura se serializa/deserializa correctamente.

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

Descripción

Summary

InstallationPermissions in github/apps.go has no field for the organization_private_registries
App permission, so callers cannot read it off an installation and cannot request it when scoping
down an installation access token.

Detail

The endpoints it governs are already supported: github/private_registries.go, added in #3785 and
extended for OIDC in #4159. The permission itself is not modelled.

GitHub returns the key today. GET /orgs/{org}/installations includes it in an installation's
permissions map for any App that holds it:

"permissions": {
  "organization_private_registries": "read"
}

The REST documentation for the private registries endpoints also names it, in the
"Fine-grained access tokens for ..." section of each endpoint, as "Organization private registries"
organization permissions
, with GitHub App installation access tokens listed as supported:
https://docs.github.com/en/rest/private-registries/organization-configurations

Two consequences of the missing field:

  • The value is silently dropped when an installation is unmarshalled, so
    Installation.GetPermissions() cannot report it.
  • Apps.CreateInstallationToken cannot request it via InstallationTokenOptions.Permissions, so
    Go code cannot mint a token narrowed to private registries. Callers have to fall back to an
    untyped request that builds the permissions JSON by hand.

Checked on master and on v92.0.0. Alphabetically the field belongs between
OrganizationPreReceiveHooks and OrganizationProjects.

One note for anyone checking this against the published schema: the app-permissions schema in
octokit/openapi has no occurrence of private_registr at all. That schema also omits
organization_dependabot_secrets, which this struct already carries, so its omission is a gap in
the schema rather than evidence that the permission does not exist.

Proposed fix

Add the field and its generated accessor. I am planning to work on this and will open a PR.

Lenguaje dominante
Go
Estrellas
11.3k
Forks
2.5k
Merge medio
1 d 16 h
PR fusionados (30 d)
51

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 google/go-github

Todos los issues de google/go-github

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.