Skip to content

Commit da0a6a9

Browse files
committed
Add a method to retrieve an issue's comments
1 parent 3270322 commit da0a6a9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/Gitlab/Model/Issue.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,15 @@ public function addComment($body)
8787
return Note::fromArray($this->getClient(), $this, $data);
8888
}
8989

90+
public function showComments()
91+
{
92+
$notes = array();
93+
$data = $this->api('issues')->showComments($this->project->id, $this->id);
94+
95+
foreach ($data as $note) {
96+
$notes[] = Note::fromArray($this->getClient(), $this, $note);
97+
}
98+
99+
return $notes;
100+
}
90101
}

0 commit comments

Comments
 (0)