diff options
author | Rydkin Maxim <maks.rydkin@gmail.com> | 2017-04-04 21:49:16 +0300 |
---|---|---|
committer | Rydkin Maxim <maks.rydkin@gmail.com> | 2017-04-04 21:49:16 +0300 |
commit | c9806b47b868ca5fe424476077262edc1d64cac0 (patch) | |
tree | f20ae503f0b2f313adf2d79827fb1710df0c623f /app/views/projects/ci | |
parent | 2575661865be0cd230993950b78e0b4550694f78 (diff) |
extract build.pipeline as variable
Diffstat (limited to 'app/views/projects/ci')
-rw-r--r-- | app/views/projects/ci/builds/_build.html.haml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index b9ec59df3ca..c57e4e81912 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -6,10 +6,11 @@ - stage = local_assigns.fetch(:stage, false) - coverage = local_assigns.fetch(:coverage, false) - allow_retry = local_assigns.fetch(:allow_retry, false) +- pipeline = build.pipeline.present(current_user: current_user) %tr.build.commit{ class: ('retried' if retried) } %td.status - = render "ci/status/badge", status: build.detailed_status(current_user), title: status_title(build.pipeline) + = render "ci/status/badge", status: build.detailed_status(current_user), title: pipeline.status_title %td.branch-commit - if can?(current_user, :read_build, build) @@ -51,11 +52,11 @@ - if pipeline_link %td - = link_to pipeline_path(build.pipeline) do - %span.pipeline-id ##{build.pipeline.id} + = link_to pipeline_path(pipeline) do + %span.pipeline-id ##{pipeline.id} %span by - - if build.pipeline.user - = user_avatar(user: build.pipeline.user, size: 20) + - if pipeline.user + = user_avatar(user: pipeline.user, size: 20) - else %span.monospace API |