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

Function getPRReviews

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

Source from the content-addressed store, hash-verified

241}
242
243func getPRReviews(repo, prRef string) ([]reviewResponse, error) {
244 cmd := exec.Command("gh", "pr", "view", prRef, "--repo", repo, "--json", "reviews")
245 output, err := cmd.Output()
246 if err != nil {
247 return nil, err
248 }
249
250 var resp struct {
251 Reviews []reviewResponse `json:"reviews"`
252 }
253 if err := json.Unmarshal(output, &resp); err != nil {
254 return nil, err
255 }
256 return resp.Reviews, nil
257}
258
259func getPRDiff(repo, prRef string) ([]byte, error) {
260 cmd := exec.Command("gh", "pr", "diff", prRef, "--repo", repo)

Callers 1

runDiffDirectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected