| 1 | import { ApiPropertyOptional } from '@nestjs/swagger'; |
| 2 | import { IsIn, IsNotEmpty |
| 3 | import { schema } |
| 4 | |
| 5 | export class UpdateRepositoryRequestDTO |
| 6 | @ApiPropertyOptional({ |
| 7 | description: |
| 8 | 'Renaming also changes the slug, so the old URL stops resolving.', |
| 9 | }) |
| 10 | @IsString() |
| 11 | @IsNotEmpty() |
| 12 | @IsOptional() |
| 13 | name?: string |
| 14 | |
| 15 | @ApiPropertyOptional() |
| 16 | @IsString() |
| 17 | @IsOptional() |
| 18 | description?: string |
| 19 | |
| 20 | @ApiPropertyOptional({ |
| 21 | enumName: 'RepositoryVisibility', |
| 22 | enum: schema.repositoryVisiblity |
| 23 | }) |
| 24 | @IsIn(schema. |
| 25 | @IsOptional() |
| 26 | visibility?: ( |
| 27 | |
| 28 | @ApiPropertyOptional({ |
| 29 | description: |
| 30 | 'A branch name without `refs/heads/`. The branch must already exist.', |
| 31 | }) |
| 32 | @IsString() |
| 33 | @IsNotEmpty() |
| 34 | @IsOptional() |
| 35 | defaultBranch?: string |
| 36 | } |