Commit 1ad6b369 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Expose serialized pipelines for commit pipelines

parent 42e3f0fd
...@@ -30,6 +30,17 @@ class Projects::CommitController < Projects::ApplicationController ...@@ -30,6 +30,17 @@ class Projects::CommitController < Projects::ApplicationController
end end
def pipelines def pipelines
@pipelines = @commit.pipelines.order(id: :desc)
respond_to do |format|
format.html
format.json do
render json: PipelineSerializer
.new(project: @project, user: @current_user)
.with_pagination(request, response)
.represent(@pipelines)
end
end
end end
def branches def branches
......
- page_title "Pipelines", "#{@commit.title} (#{@commit.short_id})", "Commits" - page_title 'Pipelines', "#{@commit.title} (#{@commit.short_id})", 'Commits'
= render "commit_box" = render 'commit_box'
= render 'ci_menu'
= render "ci_menu" = render 'pipelines_list', pipelines: @pipelines
= render "pipelines_list", pipelines: @commit.pipelines.order(id: :desc)
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