mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-03-09 15:23:47 -05:00
[PR #138] [MERGED] fix: prevent duplicate orgs and repos #129
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/138
Author: @arunavo4
Created: 10/27/2025
Status: ✅ Merged
Merged: 10/30/2025
Merged by: @arunavo4
Base:
main← Head:issue-132-org-repo-duplicates📝 Commits (3)
8d96e17fix: prevent duplicate orgs and reposbda8d10ci: build arm64 images in PR pipeline3b8fc99workaround to get rid of unknown/unknown in OS arch📊 Changes
21 files changed (+2808 additions, -129 deletions)
View changed files
📝
.github/workflows/docker-build.yml(+9 -5)➕
drizzle/0007_whole_hellion.sql(+18 -0)➕
drizzle/meta/0007_snapshot.json(+1999 -0)📝
drizzle/meta/_journal.json(+7 -0)📝
src/components/organizations/AddOrganizationDialog.tsx(+13 -3)📝
src/components/organizations/Organization.tsx(+190 -9)📝
src/components/organizations/OrganizationsList.tsx(+45 -15)📝
src/components/repositories/AddRepositoryDialog.tsx(+11 -1)📝
src/components/repositories/Repository.tsx(+198 -10)📝
src/components/repositories/RepositoryTable.tsx(+20 -2)📝
src/lib/db/schema.ts(+6 -0)📝
src/lib/repo-utils.test.ts(+1 -1)📝
src/lib/repo-utils.ts(+1 -1)📝
src/lib/scheduler-service.ts(+8 -8)📝
src/pages/api/organizations/[id].ts(+58 -1)📝
src/pages/api/repositories/[id].ts(+53 -2)📝
src/pages/api/sync/index.ts(+9 -7)📝
src/pages/api/sync/organization.ts(+93 -46)📝
src/pages/api/sync/repository.ts(+65 -16)📝
src/types/Repository.ts(+2 -1)...and 1 more files
📄 Description
Highlights | Closes #132
indexes, and the migration backfills values while pruning extra rows per user_id (src/lib/db/schema.ts:329-478, drizzle/0007_whole_hellion.sql).
(src/pages/api/sync/organization.ts:16-200, src/pages/api/sync/repository.ts:17-182, src/pages/api/sync/index.ts:73-182, src/lib/scheduler-service.ts:100-207,
src/lib/repo-utils.ts:23-55).
before the modal, and add/reset logic keeps forms tidy (src/components/organizations/Organization.tsx:200-334, 813-880, src/components/repositories/
Repository.tsx:640-724, 1285-1347, src/components/organizations/AddOrganizationDialog.tsx:19-141, src/components/repositories/AddRepositoryDialog.tsx:19-104).
remove mirror job history) and the UI exposes red “Delete from Mirror” actions with confirmation copy clarifying nothing happens on Gitea (src/pages/api/
organizations/[id].ts:65-119, src/pages/api/repositories/[id].ts:65-113, src/components/organizations/OrganizationsList.tsx:18-136, src/components/repositories/
RepositoryTable.tsx:1-714).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.