summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/projects/ci/lints/_create.html.haml9
-rw-r--r--changelogs/unreleased/fix-showing-emptry-blocks-in-ci-lint.yml5
2 files changed, 11 insertions, 3 deletions
diff --git a/app/views/projects/ci/lints/_create.html.haml b/app/views/projects/ci/lints/_create.html.haml
index 59b5b9f8a30..f62d7bec629 100644
--- a/app/views/projects/ci/lints/_create.html.haml
+++ b/app/views/projects/ci/lints/_create.html.haml
@@ -17,9 +17,12 @@
%tr
%td #{stage.capitalize} Job - #{build[:name]}
%td
- %pre= job[:before_script].to_a.join('\n')
- %pre= job[:script].to_a.join('\n')
- %pre= job[:after_script].to_a.join('\n')
+ - if job[:before_script]
+ %pre= job[:before_script].to_a.join('\n')
+ - if job[:script]
+ %pre= job[:script].to_a.join('\n')
+ - if job[:after_script]
+ %pre= job[:after_script].to_a.join('\n')
%br
%b= _("Tag list:")
diff --git a/changelogs/unreleased/fix-showing-emptry-blocks-in-ci-lint.yml b/changelogs/unreleased/fix-showing-emptry-blocks-in-ci-lint.yml
new file mode 100644
index 00000000000..04ae74bb000
--- /dev/null
+++ b/changelogs/unreleased/fix-showing-emptry-blocks-in-ci-lint.yml
@@ -0,0 +1,5 @@
+---
+title: Fix showing empty blocks in ci lint
+merge_request:
+author:
+type: fixed