MCPcopy Create free account
hub / github.com/cli/cli / getRepoSuggestions

Function getRepoSuggestions

pkg/cmd/codespace/create.go:580–593  ·  view source on GitHub ↗
(ctx context.Context, apiClient apiClient, partialSearch string)

Source from the content-addressed store, hash-verified

578}
579
580func getRepoSuggestions(ctx context.Context, apiClient apiClient, partialSearch string) []string {
581 searchParams := api.RepoSearchParameters{
582 // The prompt shows 7 items so 7 effectively turns off scrolling which is similar behavior to other clients
583 MaxRepos: 7,
584 Sort: "repo",
585 }
586
587 repos, err := apiClient.GetCodespaceRepoSuggestions(ctx, partialSearch, searchParams)
588 if err != nil {
589 return nil
590 }
591
592 return repos
593}
594
595// buildDisplayName returns display name to be used in the machine survey prompt.
596// prebuildAvailability will be migrated to use enum values: "none", "ready", "in_progress" before Prebuild GA

Callers 1

CreateMethod · 0.85

Calls 1

Tested by

no test coverage detected