Skip to content

Commit 1bba50b

Browse files
BagToadCopilot
andcommitted
Fix duplicate reviewers in gh pr edit by passing logins as defaults
Use DefaultLogins instead of Default display names when calling MultiSelectWithSearch for reviewers. The dedup logic in the prompter compares keys (logins) against defaults, so passing display names like 'mxie (Melissa Xie)' prevented deduplication against search result keys like 'mxie'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 90bfa62 commit 1bba50b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/cmd/pr/shared/editable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ func EditFieldsSurvey(p EditPrompter, editable *Editable, editorCommand string)
317317
editable.Reviewers.Value, err = p.MultiSelectWithSearch(
318318
"Reviewers",
319319
"Search reviewers",
320-
editable.Reviewers.Default,
320+
editable.Reviewers.DefaultLogins,
321321
// No persistent options - teams are included in search results
322322
[]string{},
323323
editable.ReviewerSearchFunc)

0 commit comments

Comments
 (0)