MCPcopy
hub / github.com/cli/cli / NewFinder

Function NewFinder

pkg/cmd/pr/shared/finder.go:58–73  ·  view source on GitHub ↗
(factory *cmdutil.Factory)

Source from the content-addressed store, hash-verified

56}
57
58func NewFinder(factory *cmdutil.Factory) PRFinder {
59 if finderForRunCommandStyleTests != nil {
60 f := finderForRunCommandStyleTests
61 finderForRunCommandStyleTests = &mockFinder{err: errors.New("you must use StubFinderForRunCommandStyleTests to stub PR lookups")}
62 return f
63 }
64
65 return &finder{
66 baseRepoFn: factory.BaseRepo,
67 branchFn: factory.Branch,
68 httpClient: factory.HttpClient,
69 gitConfigClient: factory.GitClient,
70 remotesFn: factory.Remotes,
71 progress: factory.IOStreams,
72 }
73}
74
75var finderForRunCommandStyleTests PRFinder
76

Callers 15

NewCmdCloseFunction · 0.92
NewCmdMergeFunction · 0.92
NewCmdReadyFunction · 0.92
NewCmdReopenFunction · 0.92
NewCmdChecksFunction · 0.92
NewCmdViewFunction · 0.92
NewCmdDiffFunction · 0.92
NewCmdCheckoutFunction · 0.92
NewCmdCommentFunction · 0.92
NewCmdCreateFunction · 0.92
NewCmdRevertFunction · 0.92

Calls

no outgoing calls

Tested by 2