| 225 | } |
| 226 | |
| 227 | func 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 | |
| 243 | func getPRReviews(repo, prRef string) ([]reviewResponse, error) { |
| 244 | cmd := exec.Command("gh", "pr", "view", prRef, "--repo", repo, "--json", "reviews") |