From e24f55d5a447c17898293f8a6276cac3ce2d7236 Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Mon, 23 Mar 2026 15:34:44 -0600 Subject: [PATCH] refactor(pr edit): remove actor accumulation hack from assignee search The assigneeSearchFunc previously accumulated actors into editable.Metadata.AssignableActors so that MembersToIDs could later resolve logins to node IDs. Now that the edit flow uses AssigneeLogins + ReplaceActorsForAssignableByLogin on github.com, this accumulation is no longer needed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pkg/cmd/pr/edit/edit.go | 7 ------- pkg/cmd/pr/shared/editable.go | 4 ---- 2 files changed, 11 deletions(-) diff --git a/pkg/cmd/pr/edit/edit.go b/pkg/cmd/pr/edit/edit.go index 157fc8f8a..3a6a9d083 100644 --- a/pkg/cmd/pr/edit/edit.go +++ b/pkg/cmd/pr/edit/edit.go @@ -348,9 +348,6 @@ func editRun(opts *EditOptions) error { // assigneeSearchFunc is intended to be an arg for MultiSelectWithSearch // to return potential assignee actors. -// It also contains an important enclosure to update the editable's -// assignable actors metadata for later ID resolution - this is required -// while we continue to use IDs for mutating assignees with the GQL API. func assigneeSearchFunc(apiClient *api.Client, repo ghrepo.Interface, editable *shared.Editable, assignableID string) func(string) prompter.MultiSelectSearchResult { searchFunc := func(input string) prompter.MultiSelectSearchResult { actors, availableAssigneesCount, err := api.SuggestedAssignableActors( @@ -382,10 +379,6 @@ func assigneeSearchFunc(apiClient *api.Client, repo ghrepo.Interface, editable * } else { displayNames = append(displayNames, a.Login()) } - - // Update the assignable actors metadata in the editable struct - // so that updating the PR later can resolve the actor ID. - editable.Metadata.AssignableActors = append(editable.Metadata.AssignableActors, a) } return prompter.MultiSelectSearchResult{ Keys: logins, diff --git a/pkg/cmd/pr/shared/editable.go b/pkg/cmd/pr/shared/editable.go index bb6228b4e..a26c2a024 100644 --- a/pkg/cmd/pr/shared/editable.go +++ b/pkg/cmd/pr/shared/editable.go @@ -142,10 +142,6 @@ func (e Editable) AssigneeIds(client *api.Client, repo ghrepo.Interface) (*[]str e.Assignees.Value = assigneeSet.ToSlice() } - // TODO replaceActorsByLoginCleanup - // When ActorAssignees is true (github.com), this should compute the final - // assignee logins and return them directly without resolving to IDs, for use - // with ReplaceActorsForAssignableByLogin. a, err := e.Metadata.MembersToIDs(e.Assignees.Value) return &a, err }