Check state.ActorReviewers in MetadataSurvey reviewer search gate

Gate search-based reviewer selection on both state.ActorReviewers
and the search function being available, consistent with the
ActorAssignees pattern used for assignees.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Kynan Ware 2026-03-05 10:57:28 -07:00
parent 8f62e8116d
commit dd7e44ee0a

View file

@ -183,7 +183,7 @@ func MetadataSurvey(p Prompt, io *iostreams.IOStreams, baseRepo ghrepo.Interface
// Retrieve and process data for survey prompts based on the extra fields selected.
// When search-based reviewer selection is available, skip the expensive assignable-users
// and teams fetch since reviewers are found dynamically via the search function.
useReviewerSearch := reviewerSearchFunc != nil
useReviewerSearch := state.ActorReviewers && reviewerSearchFunc != nil
metadataInput := api.RepoMetadataInput{
Reviewers: isChosen("Reviewers") && !useReviewerSearch,
TeamReviewers: isChosen("Reviewers") && !useReviewerSearch,