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>
This commit is contained in:
Kynan Ware 2026-03-23 15:34:44 -06:00
parent b3cfe7454c
commit e24f55d5a4
2 changed files with 0 additions and 11 deletions

View file

@ -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,

View file

@ -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
}