chore: make owner_name and owner_username consistent (#18081)

We've been using owner_name inconsistently as username. So this PR fixes
it by making the attribute naming more consistent.
This commit is contained in:
Bruno Quaresma
2025-05-28 17:25:32 -03:00
committed by GitHub
parent 3a2e36237d
commit 2ec7404197
53 changed files with 151 additions and 131 deletions

View File

@ -30,7 +30,8 @@ type Workspace struct {
CreatedAt time.Time `json:"created_at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
OwnerID uuid.UUID `json:"owner_id" format:"uuid"`
OwnerName string `json:"owner_name"`
OwnerName string `json:"owner_name,omitempty"`
OwnerUsername string `json:"owner_username"`
OwnerAvatarURL string `json:"owner_avatar_url"`
OrganizationID uuid.UUID `json:"organization_id" format:"uuid"`
OrganizationName string `json:"organization_name"`
@ -69,7 +70,7 @@ type Workspace struct {
}
func (w Workspace) FullName() string {
return fmt.Sprintf("%s/%s", w.OwnerName, w.Name)
return fmt.Sprintf("%s/%s", w.OwnerUsername, w.Name)
}
type WorkspaceHealth struct {