Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-08-31 18:58:13 +0300
committerFilipa Lacerda <filipa@gitlab.com>2018-08-31 18:59:23 +0300
commitecefe090460687a078e3d1aacf621fd5bff07fb5 (patch)
treecc60b6d66838da18474144556673be1175f7a51d /app/views/projects/pipelines/_info.html.haml
parent472f2d566633df6c1dee1f703b06958b9a0a2cd8 (diff)
Render link to branch only when branch still exists
Diffstat (limited to 'app/views/projects/pipelines/_info.html.haml')
-rw-r--r--app/views/projects/pipelines/_info.html.haml6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml
index ccb83148ded..57c5f64ee8d 100644
--- a/app/views/projects/pipelines/_info.html.haml
+++ b/app/views/projects/pipelines/_info.html.haml
@@ -13,7 +13,11 @@
= pluralize @pipeline.total_size, "job"
- if @pipeline.ref
from
- = link_to @pipeline.ref, project_ref_path(@project, @pipeline.ref), class: "ref-name"
+ - if @project.repository.branch_exists?(@pipeline.ref)
+ = link_to @pipeline.ref, project_ref_path(@project, @pipeline.ref), class: "ref-name"
+ - else
+ %span.ref-name
+ = @pipeline.ref
- if @pipeline.duration
in
= time_interval_in_words(@pipeline.duration)