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

Function requestableReviewersForCompletion

pkg/cmd/pr/create/create.go:1306–1326  ·  view source on GitHub ↗
(opts *CreateOptions)

Source from the content-addressed store, hash-verified

1304}
1305
1306func requestableReviewersForCompletion(opts *CreateOptions) ([]string, error) {
1307 httpClient, err := opts.HttpClient()
1308 if err != nil {
1309 return nil, err
1310 }
1311
1312 remotes, err := getRemotes(opts)
1313 if err != nil {
1314 return nil, err
1315 }
1316 repoContext, err := ghContext.ResolveRemotesToRepos(remotes, api.NewClientFromHTTP(httpClient), opts.RepoOverride)
1317 if err != nil {
1318 return nil, err
1319 }
1320 baseRepo, err := repoContext.BaseRepo(opts.IO)
1321 if err != nil {
1322 return nil, err
1323 }
1324
1325 return shared.RequestableReviewersForCompletion(httpClient, baseRepo)
1326}
1327
1328var gitPushRegexp = regexp.MustCompile("^remote: (Create a pull request.*by visiting|[[:space:]]*https://.*/pull/new/).*\n?$")

Callers 1

NewCmdCreateFunction · 0.85

Calls 4

NewClientFromHTTPFunction · 0.92
getRemotesFunction · 0.85
BaseRepoMethod · 0.65

Tested by

no test coverage detected