| 126 | } |
| 127 | |
| 128 | func 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 | |
| 148 | func checksRun(opts *ChecksOptions) error { |
| 149 | if opts.WebMode { |