mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-11-04 08:12:21 +01:00
An admin who runs this alone wants to show a team what is being mirrored without handing out a login (#428). GET /api/repositories/export and GET /api/organizations/export return the tracked rows as a CSV file, and an Export CSV button on both pages downloads them. The file is the table without the internal fields: the ids, the metadata sync state and the mirror option overrides. Rows are scoped to the signed in user and ordered by full name and by name. No filters in this pass, the export is always the whole list. toCsv in src/lib/utils/csv.ts does the RFC 4180 work: a header row, CRLF line endings, quoting for commas, quotes and newlines, ISO dates, true and false for booleans, and empty for null.