mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-08-23 16:49:45 +08:00
088467a57d
GitHub's listForAuthenticatedUser defaults to returning every repo the user has access to (owner + collaborator + organization_member), which imports a lot of noise for users who only want their own repos. Adds an `includeCollaboratorRepos` toggle, defaulting to true to preserve existing behavior. When disabled, the affiliation filter scopes the API call to "owner" only. The cleanup service overrides the filter to always include collaborator repos when computing the "what's still on GitHub" list. Without this, toggling the option off would mark previously-mirrored collab repos as orphaned and archive/delete them from Gitea. Wired through the schema, both UI<->DB mappers, the env-config loader (with new INCLUDE_COLLABORATOR_REPOS env var), and the settings UI.