summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-02-15 16:06:45 -0500
committerRobert Speicher <rspeicher@gmail.com>2016-02-15 16:06:45 -0500
commit789aef7f26597f026859b2ddd29fab1120ce8abe (patch)
treeb6292006b40c242c889c87df2ed6964b3d455906 /lib
parentc29517aaf420b0d83f21d468b371260f4887cf00 (diff)
downloadgitlab-ce-789aef7f26597f026859b2ddd29fab1120ce8abe.tar.gz
Handle nil commits in Gitlab::PushDataBuilder.buildrs-issue-13469
Closes #13469
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/push_data_builder.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/push_data_builder.rb b/lib/gitlab/push_data_builder.rb
index 4f9cdef3869..efcb23c0c6d 100644
--- a/lib/gitlab/push_data_builder.rb
+++ b/lib/gitlab/push_data_builder.rb
@@ -22,6 +22,8 @@ module Gitlab
# }
#
def build(project, user, oldrev, newrev, ref, commits = [], message = nil)
+ commits = Array(commits)
+
# Total commits count
commits_count = commits.size