Skip to content

[Question] how to retrieve the all the PR Comments #525

@ltagliamonte

Description

@ltagliamonte

Is it possible to retrieve all the comments associated with a PR?
At the moment if I do:

searchResults, resp, _ := client.Search.Issues(prSearchPattern, searchOpt)
fmt.Println("The following PRs match the search pattern", prSearchPattern)
for _, pr := range searchResults.Issues {
  		fmt.Println(*pr.Number)
		fmt.Println(*pr.Title)              
		fmt.Println(*pr.Comments)
}

pr.Comments is just holding the number of comments associated with the PR.
From the github doc the comments are managed by the Issue Comments API
https://developer.github.com/v3/issues/comments/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions