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

Function getPRDiff

cli/github/main.go:259–266  ·  view source on GitHub ↗
(repo, prRef string)

Source from the content-addressed store, hash-verified

257}
258
259func getPRDiff(repo, prRef string) ([]byte, error) {
260 cmd := exec.Command("gh", "pr", "diff", prRef, "--repo", repo)
261 output, err := cmd.Output()
262 if err != nil {
263 return nil, fmt.Errorf("gh pr diff: %w", err)
264 }
265 return output, nil
266}
267
268func parsePRRef(input string) (string, string, int, error) {
269 candidate := strings.TrimSpace(strings.TrimSuffix(input, "/"))

Callers 1

runDiffDirectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected