Skip to content

Commit 493434b

Browse files
committed
added 'addNote' method to MergeRequests API
1 parent e78233d commit 493434b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/Gitlab/Api/MergeRequests.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,19 @@ public function showNotes($project_id, $mr_id, $page = 1, $per_page = self::PER_
153153
return $this->getList($project_id, null, $page, $per_page, $order_by, $sort, 'merge_requests/'.$this->encodePath($mr_id).'/notes');
154154
}
155155

156+
/**
157+
* @param int $project_id
158+
* @param int $mr_id
159+
* @param string $note
160+
* @return mixed
161+
*/
162+
public function addNote($project_id, $mr_id, $note)
163+
{
164+
return $this->post($this->getProjectPath($project_id, 'merge_request/'.$this->encodePath($mr_id).'/notes'), array(
165+
'body' => $note
166+
));
167+
}
168+
156169
/**
157170
* @param int $project_id
158171
* @param int $mr_id

0 commit comments

Comments
 (0)