summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2015-08-03 13:33:45 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2015-08-03 13:33:45 +0000
commitf7dbf6d1a4b5724445de4da658103ce976b02a29 (patch)
treee0429a7493e3ef911f4789754ba34cafb9fa4c5a /app
parentd88b93624b8f4c530386a9dadc7d909244479ec6 (diff)
parent0b9e43f9dd0bef980d72af81a562bd0e947eee8d (diff)
downloadgitlab-ci-f7dbf6d1a4b5724445de4da658103ce976b02a29.tar.gz
Merge branch 'truncate-fix' into 'master'
Fix truncate_first_line if message is nil Fixes https://gitlab.com/gitlab-org/gitlab-ci/issues/255 /cc @jacobvosmaer See merge request !217
Diffstat (limited to 'app')
-rw-r--r--app/helpers/commits_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb
index 37a9f34..c212e8b 100644
--- a/app/helpers/commits_helper.rb
+++ b/app/helpers/commits_helper.rb
@@ -17,6 +17,6 @@ module CommitsHelper
end
def truncate_first_line(message, length = 50)
- truncate(message.lines.first.chomp, length: length)
+ truncate(message.each_line.first.chomp, length: length) if message
end
end