Commit 3cb37c03 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Expose serialized pipelines API for merge requests

parent 1ad6b369
...@@ -214,7 +214,16 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -214,7 +214,16 @@ class Projects::MergeRequestsController < Projects::ApplicationController
render 'show' render 'show'
end end
format.json { render json: { html: view_to_html_string('projects/merge_requests/show/_pipelines') } }
format.json do
render json: {
html: view_to_html_string('projects/merge_requests/show/_pipelines'),
pipelines: PipelineSerializer
.new(project: @project, user: @current_user)
.with_pagination(request, response)
.represent(@pipelines)
}
end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment