mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-10-26 00:01:25 +00:00
The repositories table is unique on (user_id, source_id, normalized_full_name) so the same owner/name can live on two hosts. Discovery used that key to decide what was new, so two source rows on one host (an organization pinned to a public-only github.com source next to a personal github.com token) each inserted their own row for one repository, and the scheduler mirrored both to the same destination in the same batch. A repository is now identified by its host and full name whichever source lists it: personal discovery, organization re-discovery and the two import endpoints skip repositories the user already tracks on that host, and each scheduler pass runs one row per upstream repository, logging the duplicate rows it skips. Found while investigating #417.