()
| 1155 | } |
| 1156 | |
| 1157 | func clipboardPullRequestRef() string { |
| 1158 | cmd := exec.Command("pbpaste") |
| 1159 | var stdout bytes.Buffer |
| 1160 | cmd.Stdout = &stdout |
| 1161 | if err := cmd.Run(); err != nil { |
| 1162 | return "" |
| 1163 | } |
| 1164 | |
| 1165 | text := strings.TrimSpace(stdout.String()) |
| 1166 | if text == "" { |
| 1167 | return "" |
| 1168 | } |
| 1169 | |
| 1170 | _, _, repoFound, numberFound := guessPullRequestDetails(text) |
| 1171 | if repoFound && numberFound { |
| 1172 | return text |
| 1173 | } |
| 1174 | return "" |
| 1175 | } |
| 1176 | |
| 1177 | func promptRepo(out io.Writer, reader *bufio.Reader) (string, error) { |
| 1178 | for { |
no test coverage detected