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

Repos transferred into the org are not synced (no repository.transferred handler)

Abierto Apto para principiantes
#1,107 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@breymander ya está trabajando en esto.

Desde el 13/10/2026.

  • #1108 de @breymander — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
70/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript
Área
backend

Línea de trabajo

Los manejadores de eventos se registran en index.js, que ya cubre repository.created, edited, renamed, archived y unarchived, pero no repository.transferred. Lee el manejador de repository.created y reutiliza su ruta de sincronización para el nuevo evento. Está terminado cuando una entrega de repository.transferred activa la misma sincronización de la configuración combinada de org, suborg y repo que repository.created. Comprueba que las pruebas existentes del manejador siguen pasando.

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

Descripción

Problem Description

What is actually happening

When a repository is transferred into an org that safe-settings manages, safe-settings does nothing. The org defaults, suborg settings and the repo's own .github/repos/<repo>.yml are not applied until something else triggers a sync, usually the next CRON full sync or a human editing the repo.

We hit this during an org-to-org migration:

  1. Merged .github/repos/<repo>.yml into the admin repo while the repo still lived in the source org. The push-triggered sync failed with 404 Not Found on Autolinks, Teams and Environments for that repo, which is expected since it did not exist in the org yet.
  2. Transferred the repo into the org.
  3. GitHub delivered repository.transferred to the receiving org's installation. safe-settings logged nothing for the repo and applied nothing.

The repo stayed on its pre-transfer settings until the next cron run. In our case that meant missing team grants, missing autolinks, repo flags not matching org defaults, and environment reviewers still pointing at teams in the old org.

What is the expected behavior

A repo transferred into the org should be treated like repository.created: the merged org, suborg and repo config is applied right away.

index.js registers handlers for repository.created, edited, renamed, archived and unarchived, but not repository.transferred. Per the webhook docs, transferred is sent to the account the repo is transferred to, so the receiving installation already gets the event. It just isn't handled. The App already subscribes to repository events, so no permission or subscription change is needed.

Error output, if available

Push-triggered sync before the transfer (expected, repo not yet in the org):

ERROR (event): Error HttpError: Not Found - https://docs.github.com/rest/repos/autolinks#get-all-autolinks-of-a-repository in Autolinks for repo: {"repo":"<repo>","owner":"<org>"}
ERROR (event): Error HttpError: Not Found - https://docs.github.com/rest/repos/repos#list-repository-teams in Teams for repo: {"repo":"<repo>","owner":"<org>"}
ERROR (event): Error HttpError: Not Found - https://docs.github.com/rest/deployments/environments#list-environments in Environments for repo: {"repo":"<repo>","owner":"<org>"}

After the transfer: no log lines for the repo at all.

Context

Are you using the hosted instance of probot/settings or running your own?

Running our own (Helm chart, ghcr.io/github-community-projects/safe-settings).

If running your own instance, are you using it with github.com or GitHub Enterprise?

github.com (GitHub Enterprise Cloud)

Version of probot/settings

safe-settings 3.0.0 (also checked main-enterprise at 4dac294, same behavior)

Version of GitHub Enterprise

GHEC

Workaround

Any human edit to the repo after the transfer (for example gh repo edit <org>/<repo> --description "...") fires repository.edited and triggers a sync. Alternatively, merge the per-repo yml after the transfer so the push-triggered sync finds the repo.

I'll open a PR that adds a repository.transferred handler mirroring repository.created.

Lenguaje dominante
JavaScript
Estrellas
926
Forks
230
Merge medio
3 d 9 h
PR fusionados (30 d)
18

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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-community-projects/safe-settings

Todos los issues de github-community-projects/safe-settings

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.