-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
From code review of completion follow-up PR.
Problem
CompleteWorkspaceMembers has a 3-level fallback chain (Nickname → Username → DisplayName) in internal/cmdutil/completion.go:251-257, but there are no tests exercising this logic.
Suggested Fix
Extract the name-resolution logic into a pure function like resolveMemberName(user *api.User) string and add table-driven tests covering:
- All fields present (should use Nickname)
- Nickname empty (should use Username)
- Nickname and Username empty (should use DisplayName)
- All empty (should skip the member)
Files
internal/cmdutil/completion.gointernal/cmdutil/completion_test.go
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request