From 9886998f24b3d6e44aafc412b87980cb1755544c Mon Sep 17 00:00:00 2001 From: Stuart Pook Date: Wed, 19 Mar 2014 19:07:51 +0100 Subject: Add method to get the comments on a merge request Add method to get the comments for a merge request and document that you can change the status of a merge request. --- doc/api/merge_requests.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'doc/api') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 2ddaea5a584..3ce0fb84917 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -150,6 +150,7 @@ Parameters: + `target_branch` - The target branch + `assignee_id` - Assignee user ID + `title` - Title of MR ++ `state_event` - New state (close|reopen|merge) ```json @@ -210,3 +211,44 @@ Parameters: "note":"text1" } ``` + + +## Get the comments on a MR + +Gets all the comments associated with a merge request. + +``` +GET /projects/:id/merge_request/:merge_request_id/comments +``` + +Parameters: + ++ `id` (required) - The ID of a project ++ `merge_request_id` (required) - ID of merge request + +```json +[ + { + "note":"this is the 1st comment on the 2merge merge request", + "author":{ + "id":11, + "username":"admin", + "email":"admin@local.host", + "name":"Administrator", + "state":"active", + "created_at":"2014-03-06T08:17:35.000Z" + } + }, + { + "note":"_Status changed to closed_", + "author":{ + "id":11, + "username":"admin", + "email":"admin@local.host", + "name":"Administrator", + "state":"active", + "created_at":"2014-03-06T08:17:35.000Z" + } + } +] +``` -- cgit v1.2.1