diff --git a/backend/src/modules/repo/dto/create-repo.dto.ts b/backend/src/modules/repo/dto/create-repo.dto.ts index c6b679d..e6190bc 100644 --- a/backend/src/modules/repo/dto/create-repo.dto.ts +++ b/backend/src/modules/repo/dto/create-repo.dto.ts @@ -1,6 +1,5 @@ import { IsBoolean, - IsIn, IsNotEmpty, IsOptional, IsString, @@ -8,7 +7,6 @@ import { MaxLength, } from 'class-validator'; import { ApiProperty } from '@nestjs/swagger'; -import type { RepoVisibility } from '../entities/repo.entity'; // 저장소 생성 DTO export class CreateRepoDto { @@ -34,14 +32,6 @@ export class CreateRepoDto { @MaxLength(40) name!: string; - @ApiProperty({ - description: '공개 범위', - enum: ['private', 'public'], - example: 'private', - }) - @IsIn(['private', 'public'], { message: '공개 범위를 선택해 주세요.' }) - visibility!: RepoVisibility; - @ApiProperty({ description: '프로젝트 설명(필수)', example: '3분기 신제품 런칭을 위한 마케팅 캠페인 저장소', diff --git a/backend/src/modules/repo/dto/update-repo.dto.ts b/backend/src/modules/repo/dto/update-repo.dto.ts index c43811b..a2a4aa6 100644 --- a/backend/src/modules/repo/dto/update-repo.dto.ts +++ b/backend/src/modules/repo/dto/update-repo.dto.ts @@ -1,8 +1,7 @@ -import { IsIn, IsOptional, IsString, MaxLength } from 'class-validator'; +import { IsOptional, IsString, MaxLength } from 'class-validator'; import { ApiProperty } from '@nestjs/swagger'; -import type { RepoVisibility } from '../entities/repo.entity'; -// 저장소 수정 DTO — 표시 제목/설명/공개범위/브랜치 (slug·owner 는 변경 불가) +// 저장소 수정 DTO — 표시 제목/설명/브랜치 (slug·owner 는 변경 불가, 공개범위는 Gitea 기준) export class UpdateRepoDto { @ApiProperty({ description: '표시 제목(한글)', required: false }) @IsOptional() @@ -16,15 +15,6 @@ export class UpdateRepoDto { @MaxLength(300) description?: string; - @ApiProperty({ - description: '공개 범위', - enum: ['private', 'public'], - required: false, - }) - @IsOptional() - @IsIn(['private', 'public'], { message: '공개 범위를 선택해 주세요.' }) - visibility?: RepoVisibility; - @ApiProperty({ description: '메인 브랜치', required: false }) @IsOptional() @IsString() diff --git a/backend/src/modules/repo/repo.service.ts b/backend/src/modules/repo/repo.service.ts index 9f37560..c7ce0dd 100644 --- a/backend/src/modules/repo/repo.service.ts +++ b/backend/src/modules/repo/repo.service.ts @@ -37,7 +37,6 @@ export interface RepoResponse { owner: string; slug: string; // owner/slugName desc: string | null; - visibility: RepoVisibility; branch: string; cloneUrl: string | null; htmlUrl: string | null; @@ -139,7 +138,8 @@ export class RepoService { } const description = dto.description; - const visibility = dto.visibility; + // 공개 범위는 사용자 입력에서 제거됨 — 새 저장소는 공개(public)로 생성 + const visibility: RepoVisibility = 'public'; const requestedBranch = dto.branch?.trim() || 'main'; const owner = this.gitea.enabled ? this.gitea.org : DEFAULT_OWNER; @@ -206,37 +206,31 @@ export class RepoService { const prevName = repo.name; const prevDescription = repo.description ?? ''; - const prevVisibility = repo.visibility; const prevBranch = repo.branch; if (dto.name !== undefined) repo.name = dto.name; if (dto.description !== undefined) repo.description = dto.description; - if (dto.visibility !== undefined) repo.visibility = dto.visibility; if (dto.branch !== undefined && dto.branch.trim()) repo.branch = dto.branch.trim(); const nameChanged = repo.name !== prevName; const descriptionChanged = (repo.description ?? '') !== prevDescription; - const visibilityChanged = repo.visibility !== prevVisibility; const branchChanged = repo.branch !== prevBranch; await this.repoRepo.save(repo); - // Gitea 메타데이터 동기화 (실제로 바뀐 경우에만) + // Gitea 메타데이터 동기화 (실제로 바뀐 경우에만). 공개 범위는 Gitea 기준이라 푸시하지 않음. const giteaDescChanged = nameChanged || descriptionChanged; if ( this.gitea.enabled && repo.giteaRepoId !== null && - (giteaDescChanged || visibilityChanged || branchChanged) + (giteaDescChanged || branchChanged) ) { await this.gitea .updateRepo(repo.slugName, { description: giteaDescChanged ? this.buildGiteaDescription(repo.name, repo.description) : undefined, - private: visibilityChanged - ? repo.visibility === 'private' - : undefined, defaultBranch: branchChanged ? repo.branch : undefined, }) .catch((e: unknown) => { @@ -376,7 +370,6 @@ export class RepoService { owner: repo.owner, slug: `${repo.owner}/${repo.slugName}`, desc: repo.description, - visibility: repo.visibility, branch: repo.branch, cloneUrl: repo.cloneUrl, htmlUrl: repo.htmlUrl, diff --git a/frontend/src/mock/relay.mock.ts b/frontend/src/mock/relay.mock.ts index aa03bc2..231d0d9 100644 --- a/frontend/src/mock/relay.mock.ts +++ b/frontend/src/mock/relay.mock.ts @@ -6,9 +6,6 @@ /** 업무 상태 */ export type TaskStatus = 'todo' | 'prog' | 'review' | 'done' | 'changes' -/** 저장소 공개 여부 */ -export type Visibility = 'private' | 'public' - /** 사용자(멤버) */ export interface User { id: string @@ -46,7 +43,6 @@ export interface Repo { owner: string slug: string desc: string - visibility: Visibility branch: string members: User[] /** 멤버 스택에서 추가로 더 있는 인원 수(+N) */ diff --git a/frontend/src/pages/relay/ProjectReposPage.vue b/frontend/src/pages/relay/ProjectReposPage.vue index c65782d..c65a77e 100644 --- a/frontend/src/pages/relay/ProjectReposPage.vue +++ b/frontend/src/pages/relay/ProjectReposPage.vue @@ -7,7 +7,7 @@ import ProjectHeader from '@/components/ProjectHeader.vue' import ProjectTabs from '@/components/ProjectTabs.vue' import { useProjectStore } from '@/stores/project.store' import { useRepo } from '@/composables/useRepo' -import type { Project, Visibility } from '@/mock/relay.mock' +import type { Project } from '@/mock/relay.mock' import type { ApiRepo, RepoCreateMeta } from '@/types/repo' const route = useRoute() @@ -60,7 +60,6 @@ const meta = ref(null) const slug = ref('') const name = ref('') const description = ref('') -const visibility = ref('private') const useTemplate = ref(false) const submitting = ref(false) @@ -88,7 +87,6 @@ function closeForm() { slug.value = '' name.value = '' description.value = '' - visibility.value = 'private' useTemplate.value = false slugAvailable.value = null } @@ -132,7 +130,6 @@ async function linkRepo() { slug: slug.value.trim(), name: name.value.trim(), description: description.value.trim(), - visibility: visibility.value, ...(meta.value?.template.available ? { useTemplate: useTemplate.value } : {}), }) closeForm() @@ -301,30 +298,6 @@ async function unlinkRepo(repo: ApiRepo) { /> -
-
- * 공개 범위 -
-
- - -
-
-
@@ -402,10 +375,6 @@ async function unlinkRepo(repo: ApiRepo) {
{{ repo.name }} - {{ repo.visibility === 'private' ? '비공개' : '공개' }}