public function getComments($id)
{
$pager = new ResultPager($this->client);
$fetchedComments = $pager->fetchAll($this->client->api('issue')->comments(), 'all', [$this->getUsername(), $this->getRepository(), $id]);
$comments = [];
foreach ($fetchedComments as $comment) {
$comments[] = ['id' => $comment['id'], 'url' => $comment['html_url'], 'body' => $comment['body'], 'user' => $comment['user']['login'], 'created_at' => !empty($comment['created_at']) ? new \DateTime($comment['created_at']) : null, 'updated_at' => !empty($comment['updated_at']) ? new \DateTime($comment['updated_at']) : null];
}
return $comments;
}