func GetAllReviewsComments()

in pkg/review/header.go [230:245]


func GetAllReviewsComments() []*github.PullRequestComment {
	prsvc := gh.PullRequests
	options := &github.PullRequestListCommentsOptions{ListOptions: github.ListOptions{Page: 1, PerPage: 100}}

	var allComments []*github.PullRequestComment
	for comments, response, err := prsvc.ListComments(ctx, owner, repo, pr, options); err == nil; {
		allComments = append(allComments, comments...)
		if response.NextPage <= options.Page {
			break
		}
		options = &github.PullRequestListCommentsOptions{
			ListOptions: github.ListOptions{Page: response.NextPage, PerPage: options.PerPage},
		}
	}
	return allComments
}