Skip to content

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

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/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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