BigW Consortium Gitlab

Commit c9806b47 by Rydkin Maxim

extract build.pipeline as variable

parent 25756618
...@@ -6,10 +6,11 @@ ...@@ -6,10 +6,11 @@
- stage = local_assigns.fetch(:stage, false) - stage = local_assigns.fetch(:stage, false)
- coverage = local_assigns.fetch(:coverage, false) - coverage = local_assigns.fetch(:coverage, false)
- allow_retry = local_assigns.fetch(:allow_retry, false) - allow_retry = local_assigns.fetch(:allow_retry, false)
- pipeline = build.pipeline.present(current_user: current_user)
%tr.build.commit{ class: ('retried' if retried) } %tr.build.commit{ class: ('retried' if retried) }
%td.status %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 %td.branch-commit
- if can?(current_user, :read_build, build) - if can?(current_user, :read_build, build)
...@@ -51,11 +52,11 @@ ...@@ -51,11 +52,11 @@
- if pipeline_link - if pipeline_link
%td %td
= link_to pipeline_path(build.pipeline) do = link_to pipeline_path(pipeline) do
%span.pipeline-id ##{build.pipeline.id} %span.pipeline-id ##{pipeline.id}
%span by %span by
- if build.pipeline.user - if pipeline.user
= user_avatar(user: build.pipeline.user, size: 20) = user_avatar(user: pipeline.user, size: 20)
- else - else
%span.monospace API %span.monospace API
......
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