MCPcopy Index your code
hub / github.com/nikivdev/go / clipboardPullRequestRef

Function clipboardPullRequestRef

main.go:1157–1175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1155}
1156
1157func 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
1177func promptRepo(out io.Writer, reader *bufio.Reader) (string, error) {
1178 for {

Callers 1

mainFunction · 0.85

Calls 2

guessPullRequestDetailsFunction · 0.85
StringMethod · 0.80

Tested by

no test coverage detected