| 1 | import { ApiProperty } from '@nestjs/swagger'; |
| 2 | import { IsArray, IsOptional |
| 3 | |
| 4 | export class GetRepositoryBranchesResponseDTO |
| 5 | @ApiProperty({ |
| 6 | type: String, |
| 7 | nullable: true, |
| 8 | description: |
| 9 | 'Branch the repository opens on. `null` when nothing has been pushed yet.', |
| 10 | example: 'main', |
| 11 | }) |
| 12 | @IsString() |
| 13 | @IsOptional() |
| 14 | defaultBranch: string |
| 15 | |
| 16 | @ApiProperty({ |
| 17 | type: [String], |
| 18 | description: |
| 19 | 'Branch names, without the `refs/heads/` prefix, ordered by name.', |
| 20 | example: ['main', |
| 21 | }) |
| 22 | @IsArray() |
| 23 | @IsString({ each |
| 24 | branches: string[] |
| 25 | } |