refactor: 저장소(Repo)·Gitea 연동 기능 완전 제거 — 프로젝트 단독 구조

복잡도를 줄이기 위해 저장소 연동 기능을 전부 제거하고 프로젝트를 단독 단위로 운영한다.

백엔드:
- modules/repo, modules/gitea 모듈 전체 삭제(엔티티/서비스/컨트롤러/DTO/역방향 동기화)
- app.module 에서 RepoModule 제거
- ProjectService: repoCount 집계·repoRepo·"미분류" 시스템 프로젝트(ensureUnassigned/
  onApplicationBootstrap)·isSystem 게이트 전부 제거. ProjectResponse 에서 repoCount/isSystem 제거
- Project 엔티티 is_system 컬럼 제거(dev synchronize 가 DROP)
- ProjectModule forFeature 에서 Repo 제거
- Activity 타입 repo.linked/unlinked 제거
- env example 에서 Gitea/REPO_IMPORT 섹션 제거

프론트:
- ProjectReposPage, useRepo 삭제. ProjectTabs 의 '저장소' 탭·repoCount prop 제거
- 4개 페이지의 :repo-count 제거, 라우트 /projects/:id/repos 제거
- types/project·project.store·mock 에서 repoCount/isSystem·Repo 뷰 제거
- ProjectListPage 저장소수/시스템 배지·gitea CSS 제거, activity 의 repo.* 케이스 제거
- types/repo 는 공용 ApiMember 만 유지
- 잔여 '저장소'/Gitea 사용자 문구를 프로젝트로 정리

검증: 백엔드 build/lint 0·8 tests, 프론트 type-check/lint/build 0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-21 01:44:15 +09:00
parent 861c8efa6b
commit ef1757181d
34 changed files with 20 additions and 2369 deletions
-58
View File
@@ -1,58 +0,0 @@
import { useApi } from './useApi'
import type {
ApiRepo,
CreateRepoPayload,
RepoCreateMeta,
} from '@/types/repo'
import type { Paginated } from '@/types/pagination'
// 저장소 도메인 API Composable — 프로젝트에 연동된 Gitea 저장소.
// 모든 경로는 /projects/:projectId/repos 하위. 인터셉터가 success/data 를 언래핑.
export function useRepo() {
const api = useApi()
async function list(
projectId: string,
page = 1,
size = 20,
): Promise<Paginated<ApiRepo>> {
return (await api.get(`/projects/${projectId}/repos`, {
params: { page, size },
})) as unknown as Paginated<ApiRepo>
}
// 생성 폼 메타(소유자/템플릿)
async function getCreateMeta(projectId: string): Promise<RepoCreateMeta> {
return (await api.get(
`/projects/${projectId}/repos/meta`,
)) as unknown as RepoCreateMeta
}
// slug 사용 가능 여부 — 전역 유일 검사
async function checkName(
projectId: string,
slug: string,
): Promise<boolean> {
const res = (await api.get(`/projects/${projectId}/repos/name-available`, {
params: { slug },
})) as unknown as { available: boolean }
return res.available
}
async function create(
projectId: string,
payload: CreateRepoPayload,
): Promise<ApiRepo> {
return (await api.post(
`/projects/${projectId}/repos`,
payload,
)) as unknown as ApiRepo
}
// 연동 해제(삭제)
async function remove(projectId: string, repoId: string): Promise<void> {
await api.delete(`/projects/${projectId}/repos/${repoId}`)
}
return { list, getCreateMeta, checkName, create, remove }
}