diff --git a/changelogs/unreleased/ide-merge-request-info.yml b/changelogs/unreleased/ide-merge-request-info.yml new file mode 100644 index 00000000000..104f48ae309 --- /dev/null +++ b/changelogs/unreleased/ide-merge-request-info.yml @@ -0,0 +1,5 @@ +--- +title: Display merge request title & description in Web IDE +merge_request: +author: +type: added diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 2057ed3588a..34c2dd7b34d 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -358,6 +358,7 @@ Parameters: - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user - `merge_request_iid` (required) - The internal ID of the merge request +- `render_html` (optional) - If `true` response includes rendered HTML for title and description ```json { diff --git a/lib/api/merge_requests.rb b/lib/api/merge_requests.rb index b42d411022c..2621c9f8fc2 100644 --- a/lib/api/merge_requests.rb +++ b/lib/api/merge_requests.rb @@ -232,7 +232,7 @@ module API params do requires :merge_request_iid, type: Integer, desc: 'The IID of a merge request' - optional :render_html, type: Boolean, desc: 'Returns the description and title rendered html' + optional :render_html, type: Boolean, desc: 'Returns the description and title rendered HTML' end desc 'Get a single merge request' do success Entities::MergeRequest diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb index b58ca296301..1716d182782 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -306,7 +306,7 @@ describe API::MergeRequests do expect(json_response['changes_count']).to eq(merge_request.merge_request_diff.real_size) end - it 'exposes description and title html' do + it 'exposes description and title html when render_html is true' do get api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), render_html: true expect(response).to have_gitlab_http_status(200)