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

Function runCommand

pkg/cmd/pr/merge/merge_test.go:251–255  ·  view source on GitHub ↗

TODO port to new style tests

(rt http.RoundTripper, pm *prompter.PrompterMock, branch string, isTTY bool, cli string)

Source from the content-addressed store, hash-verified

249
250// TODO port to new style tests
251func runCommand(rt http.RoundTripper, pm *prompter.PrompterMock, branch string, isTTY bool, cli string) (*test.CmdOut, error) {
252 return runCommandWithBranchFunc(rt, pm, func() (string, error) {
253 return branch, nil
254 }, isTTY, cli)
255}
256
257func runCommandWithBranchFunc(rt http.RoundTripper, pm *prompter.PrompterMock, branch func() (string, error), isTTY bool, cli string) (*test.CmdOut, error) {
258 ios, _, stdout, stderr := iostreams.Test()

Calls 1

runCommandWithBranchFuncFunction · 0.85

Tested by

no test coverage detected