AssigneeSearchFunc returns a search function for MultiSelectWithSearch that dynamically fetches assignable actors for the given assignable (Issue/PR) node ID.
(apiClient *api.Client, repo ghrepo.Interface, assignableID string)
| 660 | // AssigneeSearchFunc returns a search function for MultiSelectWithSearch that |
| 661 | // dynamically fetches assignable actors for the given assignable (Issue/PR) node ID. |
| 662 | func AssigneeSearchFunc(apiClient *api.Client, repo ghrepo.Interface, assignableID string) func(string) prompter.MultiSelectSearchResult { |
| 663 | return func(input string) prompter.MultiSelectSearchResult { |
| 664 | actors, count, err := api.SuggestedAssignableActors(apiClient, repo, assignableID, input) |
| 665 | if err != nil { |
| 666 | return prompter.MultiSelectSearchResult{Err: err} |
| 667 | } |
| 668 | return actorsToSearchResult(actors, count) |
| 669 | } |
| 670 | } |
| 671 | |
| 672 | // RepoAssigneeSearchFunc returns a search function for MultiSelectWithSearch that |
| 673 | // dynamically fetches assignable actors at the repository level. Used during create |
no test coverage detected