diff options
author | Toon Claes <toon@gitlab.com> | 2017-03-27 10:23:14 +0200 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-03-27 10:23:14 +0200 |
commit | d536d9590ba1aa663bd75fc529fb13b0bf164814 (patch) | |
tree | decebc1c40a5955bd2e493536a596454443c1c7e /lib/api | |
parent | b941b0ebf514cbf39d175f6bb5e481e87d0d0639 (diff) | |
download | gitlab-ce-d536d9590ba1aa663bd75fc529fb13b0bf164814.tar.gz |
Remove `:id/merge_requests/:merge_request_iid/comments` endpoints
Comments for a merge request should be obtained to the `notes` endpoint.
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/merge_requests.rb | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb index 5cc807d5bff..c8033664133 100644 --- a/lib/api/merge_requests.rb +++ b/lib/api/merge_requests.rb @@ -226,41 +226,6 @@ module API .cancel(merge_request) end - desc 'Get the comments of a merge request' do - success Entities::MRNote - end - params do - use :pagination - end - get ':id/merge_requests/:merge_request_iid/comments' do - merge_request = find_merge_request_with_access(params[:merge_request_iid]) - present paginate(merge_request.notes.fresh), with: Entities::MRNote - end - - desc 'Post a comment to a merge request' do - success Entities::MRNote - end - params do - requires :note, type: String, desc: 'The text of the comment' - end - post ':id/merge_requests/:merge_request_iid/comments' do - merge_request = find_merge_request_with_access(params[:merge_request_iid], :create_note) - - opts = { - note: params[:note], - noteable_type: 'MergeRequest', - noteable_id: merge_request.id - } - - note = ::Notes::CreateService.new(user_project, current_user, opts).execute - - if note.save - present note, with: Entities::MRNote - else - render_api_error!("Failed to save note #{note.errors.messages}", 400) - end - end - desc 'List issues that will be closed on merge' do success Entities::MRNote end |