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

Function getPRComments

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

Source from the content-addressed store, hash-verified

225}
226
227func getPRComments(repo, prRef string) ([]commentResponse, error) {
228 cmd := exec.Command("gh", "pr", "view", prRef, "--repo", repo, "--json", "comments")
229 output, err := cmd.Output()
230 if err != nil {
231 return nil, err
232 }
233
234 var resp struct {
235 Comments []commentResponse `json:"comments"`
236 }
237 if err := json.Unmarshal(output, &resp); err != nil {
238 return nil, err
239 }
240 return resp.Comments, nil
241}
242
243func getPRReviews(repo, prRef string) ([]reviewResponse, error) {
244 cmd := exec.Command("gh", "pr", "view", prRef, "--repo", repo, "--json", "reviews")

Callers 1

runDiffDirectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected