MCPcopy Index your code
hub / github.com/cli/cli / AssigneeSearchFunc

Function AssigneeSearchFunc

pkg/cmd/pr/shared/editable.go:677–685  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

675// AssigneeSearchFunc returns a search function for MultiSelectWithSearch that
676// dynamically fetches assignable actors for the given assignable (Issue/PR) node ID.
677func AssigneeSearchFunc(apiClient *api.Client, repo ghrepo.Interface, assignableID string) func(string) prompter.MultiSelectSearchResult {
678 return func(input string) prompter.MultiSelectSearchResult {
679 actors, count, err := api.SuggestedAssignableActors(apiClient, repo, assignableID, input)
680 if err != nil {
681 return prompter.MultiSelectSearchResult{Err: err}
682 }
683 return actorsToSearchResult(actors, count)
684 }
685}
686
687// RepoAssigneeSearchFunc returns a search function for MultiSelectWithSearch that
688// dynamically fetches assignable actors at the repository level. Used during create

Callers 1

editRunFunction · 0.92

Calls 2

actorsToSearchResultFunction · 0.85

Tested by

no test coverage detected