diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-27 15:32:21 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-27 15:32:21 +0300 |
commit | 1ad6b3696bdeedcc27af4db4f592b39942e19f7d (patch) | |
tree | d87c530d5160032527d0031711424f77e9945615 /app/controllers/projects/commit_controller.rb | |
parent | 42e3f0fd7888ab8ebe11801e01dd3ca1f33b20cf (diff) |
Expose serialized pipelines for commit pipelines
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index bfc59bcc862..c871043efbd 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -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 |