Skip to content

Commit fe628e5

Browse files
tan-tan-kanarektan-tan-kanarek
authored andcommitted
Fixed listCommentsOnAnIssue and listCommentsOnRepository
1 parent 9c2bdbe commit fe628e5

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

‎client/services/GitHubIssuesComments.php‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,28 @@ class GitHubIssuesComments extends GitHubService
1717
* @param $since String (Optional) of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
1818
* @return array<GitHubPullComment>
1919
*/
20-
public function listCommentsOnAnIssue($owner, $repo, $sort = null, $direction = null, $since = null)
20+
public function listCommentsOnAnIssue($owner, $repo, $number, $sort = null, $direction = null, $since = null)
21+
{
22+
$data = array();
23+
if(!is_null($sort))
24+
$data['sort'] = $sort;
25+
if(!is_null($direction))
26+
$data['direction'] = $direction;
27+
if(!is_null($since))
28+
$data['since'] = $since;
29+
30+
return $this->client->request("/repos/$owner/$repo/issues/$number/comments", 'GET', $data, 200, 'GitHubPullComment', true);
31+
}
32+
33+
/**
34+
* List comments in a repository
35+
*
36+
* @param $sort String (Optional) `created` or `updated`
37+
* @param $direction String (Optional) `asc` or `desc`. Ignored without `sort` parameter.
38+
* @param $since String (Optional) of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ
39+
* @return array<GitHubPullComment>
40+
*/
41+
public function listCommentsOnRepository($owner, $repo, $number, $sort = null, $direction = null, $since = null)
2142
{
2243
$data = array();
2344
if(!is_null($sort))

0 commit comments

Comments
 (0)