MCPcopy
hub / github.com/cli/cli / checksRunWebMode

Function checksRunWebMode

pkg/cmd/pr/checks/checks.go:128–146  ·  view source on GitHub ↗
(opts *ChecksOptions)

Source from the content-addressed store, hash-verified

126}
127
128func checksRunWebMode(opts *ChecksOptions) error {
129 findOptions := shared.FindOptions{
130 Selector: opts.SelectorArg,
131 Fields: []string{"number"},
132 }
133 pr, baseRepo, err := opts.Finder.Find(findOptions)
134 if err != nil {
135 return err
136 }
137
138 isTerminal := opts.IO.IsStdoutTTY()
139 openURL := ghrepo.GenerateRepoURL(baseRepo, "pull/%d/checks", pr.Number)
140
141 if isTerminal {
142 fmt.Fprintf(opts.IO.ErrOut, "Opening %s in your browser.\n", text.DisplayURL(openURL))
143 }
144
145 return opts.Browser.Browse(openURL)
146}
147
148func checksRun(opts *ChecksOptions) error {
149 if opts.WebMode {

Callers 2

TestChecksRun_webFunction · 0.85
checksRunFunction · 0.85

Calls 5

GenerateRepoURLFunction · 0.92
DisplayURLFunction · 0.92
IsStdoutTTYMethod · 0.80
FindMethod · 0.65
BrowseMethod · 0.65

Tested by 1

TestChecksRun_webFunction · 0.68