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:
authorDouwe Maan <douwe@selenight.nl>2017-07-27 15:58:02 +0300
committerDouwe Maan <douwe@selenight.nl>2017-07-28 18:23:13 +0300
commit0e355e5c9293c712b5df65896371af0ba71c19b2 (patch)
treee562a8a1cc47f05bc54328bffc6ed9b5c4b0b097 /lib/gitlab/data_builder
parent4d05e85375b81d94ef828c8c5544bf62a5abc024 (diff)
Load and process at most 100 commits when pushing into default branch
Diffstat (limited to 'lib/gitlab/data_builder')
-rw-r--r--lib/gitlab/data_builder/push.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/data_builder/push.rb b/lib/gitlab/data_builder/push.rb
index 8c8729b6557..5c5f507d44d 100644
--- a/lib/gitlab/data_builder/push.rb
+++ b/lib/gitlab/data_builder/push.rb
@@ -24,11 +24,11 @@ module Gitlab
# total_commits_count: Fixnum
# }
#
- def build(project, user, oldrev, newrev, ref, commits = [], message = nil)
+ def build(project, user, oldrev, newrev, ref, commits = [], message = nil, commits_count: nil)
commits = Array(commits)
# Total commits count
- commits_count = commits.size
+ commits_count ||= commits.size
# Get latest 20 commits ASC
commits_limited = commits.last(20)