Skip to content

fix!: update WorkspaceOwnerName to use user.name instead of user.username #18025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix golden file and dbmem
  • Loading branch information
BrunoQuaresma committed May 25, 2025
commit c35f49717f7204f5591b7bb0275f00e0147b004c
1 change: 0 additions & 1 deletion cli/testdata/coder_list_--output_json.golden
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"workspace_id": "===========[workspace ID]===========",
"workspace_name": "test-workspace",
"workspace_owner_id": "==========[first user ID]===========",
"workspace_owner_name": "testuser",
"workspace_owner_username": "testuser",
"template_version_id": "============[version ID]============",
"template_version_name": "===========[version name]===========",
Expand Down
2 changes: 2 additions & 0 deletions coderd/database/dbmem/dbmem.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ func (q *FakeQuerier) convertToWorkspaceRowsNoLock(ctx context.Context, workspac

OwnerAvatarUrl: extended.OwnerAvatarUrl,
OwnerUsername: extended.OwnerUsername,
OwnerName: extended.OwnerName,

OrganizationName: extended.OrganizationName,
OrganizationDisplayName: extended.OrganizationDisplayName,
Expand Down Expand Up @@ -628,6 +629,7 @@ func (q *FakeQuerier) extendWorkspace(w database.WorkspaceTable) database.Worksp
return u.ID == w.OwnerID
})
extended.OwnerUsername = owner.Username
extended.OwnerName = owner.Name
extended.OwnerAvatarUrl = owner.AvatarURL

return extended
Expand Down