(appVersion string, invokingAgent string, cfgFunc func() (gh.Config, error), ios *iostreams.IOStreams, executablePath string, telemetryDisabler ghtelemetry.Disabler)
| 24 | var ssoURLRE = regexp.MustCompile(`\burl=([^;]+)`) |
| 25 | |
| 26 | func New(appVersion string, invokingAgent string, cfgFunc func() (gh.Config, error), ios *iostreams.IOStreams, executablePath string, telemetryDisabler ghtelemetry.Disabler) *cmdutil.Factory { |
| 27 | f := &cmdutil.Factory{ |
| 28 | AppVersion: appVersion, |
| 29 | InvokingAgent: invokingAgent, |
| 30 | Config: cfgFunc, |
| 31 | ExecutablePath: executablePath, |
| 32 | } |
| 33 | |
| 34 | f.IOStreams = ios |
| 35 | f.HttpClient = HttpClientFunc(cfgFunc, ios, appVersion, invokingAgent, telemetryDisabler) |
| 36 | f.PlainHttpClient = plainHttpClientFunc(ios, appVersion, invokingAgent, telemetryDisabler) |
| 37 | f.ExternalHttpClient = externalHttpClientFunc(ios, appVersion) |
| 38 | f.GitClient = newGitClient(f) // Depends on IOStreams, and Executable |
| 39 | f.Remotes = remotesFunc(f) // Depends on Config, and GitClient |
| 40 | f.BaseRepo = BaseRepoFunc(f.Remotes) |
| 41 | f.Prompter = newPrompter(f) // Depends on Config and IOStreams |
| 42 | f.Browser = newBrowser(f) // Depends on Config, and IOStreams |
| 43 | f.ExtensionManager = extensionManager(f) // Depends on Config, HttpClient, and IOStreams |
| 44 | f.Branch = branchFunc(f) // Depends on GitClient |
| 45 | |
| 46 | return f |
| 47 | } |
| 48 | |
| 49 | // BaseRepoFunc requests a list of Remotes, and selects the first one. |
| 50 | // Although Remotes is injected via the factory so it looks like the function might |
no test coverage detected