Description
The API package has two repository types that have significant overlap:
Repository in internal/api/repositories.go
RepositoryFull in internal/api/repositories.go
This creates confusion about which type to use and leads to unnecessary type conversions.
Current State
Repository is used for list responses
RepositoryFull is used for single repository responses
- Many fields are duplicated between the two types
Proposed Solution
- Use a single
Repository type with all fields
- Document which fields are populated in different API responses
- Consider using pointers for optional fields to distinguish between "not set" and "empty"
Files Affected
internal/api/repositories.go
- All code that uses these types
Labels
Description
The API package has two repository types that have significant overlap:
Repositoryininternal/api/repositories.goRepositoryFullininternal/api/repositories.goThis creates confusion about which type to use and leads to unnecessary type conversions.
Current State
Repositoryis used for list responsesRepositoryFullis used for single repository responsesProposed Solution
Repositorytype with all fieldsFiles Affected
internal/api/repositories.goLabels
refactortech-debt