Commit 86d29506 authored by Lukas Eipert's avatar Lukas Eipert

remove unnecessary if clause and move logic to optional partial

parent 069b2a8e
- commit = local_assigns.fetch(:commit)
- if @commit.present? - return unless commit&.present?
.commit-box
.commit-box
%h3.commit-title %h3.commit-title
= markdown(@commit.title, pipeline: :single_line) = markdown(commit.title, pipeline: :single_line)
- if @commit.description.present? - if commit.description.present?
.commit-description< .commit-description<
= preserve(markdown(@commit.description, pipeline: :single_line)) = preserve(markdown(commit.description, pipeline: :single_line))
.info-well .info-well
- if @commit.status - if commit.status
.well-segment.pipeline-info .well-segment.pipeline-info
.icon-container .icon-container
= icon('clock-o') = icon('clock-o')
...@@ -25,7 +27,7 @@ ...@@ -25,7 +27,7 @@
.well-segment.branch-info .well-segment.branch-info
.icon-container.commit-icon .icon-container.commit-icon
= custom_icon("icon_commit") = custom_icon("icon_commit")
= link_to @commit.short_id, project_commit_path(@project, @pipeline.sha), class: "commit-sha js-details-short" = link_to commit.short_id, project_commit_path(@project, @pipeline.sha), class: "commit-sha js-details-short"
= link_to("#", class: "js-details-expand d-none d-sm-none d-md-inline") do = link_to("#", class: "js-details-expand d-none d-sm-none d-md-inline") do
%span.text-expander %span.text-expander
= sprite_icon('ellipsis_h', size: 12) = sprite_icon('ellipsis_h', size: 12)
......
...@@ -7,8 +7,7 @@ ...@@ -7,8 +7,7 @@
#js-pipeline-header-vue.pipeline-header-container #js-pipeline-header-vue.pipeline-header-container
- if @commit = render "projects/pipelines/info", commit: @pipeline.commit
= render "projects/pipelines/info"
= render "projects/pipelines/with_tabs", pipeline: @pipeline = render "projects/pipelines/with_tabs", pipeline: @pipeline
......
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