Expose serialized pipelines for commit pipelines

This commit is contained in:
Grzegorz Bizon 2017-01-27 13:32:21 +01:00
parent 42e3f0fd78
commit 1ad6b3696b
2 changed files with 15 additions and 5 deletions

View File

@ -30,6 +30,17 @@ class Projects::CommitController < Projects::ApplicationController
end
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
def branches

View File

@ -1,6 +1,5 @@
- page_title "Pipelines", "#{@commit.title} (#{@commit.short_id})", "Commits"
- page_title 'Pipelines', "#{@commit.title} (#{@commit.short_id})", 'Commits'
= render "commit_box"
= render "ci_menu"
= render "pipelines_list", pipelines: @commit.pipelines.order(id: :desc)
= render 'commit_box'
= render 'ci_menu'
= render 'pipelines_list', pipelines: @pipelines