diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-07-27 14:58:02 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-07-28 17:23:13 +0200 |
commit | 0e355e5c9293c712b5df65896371af0ba71c19b2 (patch) | |
tree | e562a8a1cc47f05bc54328bffc6ed9b5c4b0b097 /lib | |
parent | 4d05e85375b81d94ef828c8c5544bf62a5abc024 (diff) | |
download | gitlab-ce-0e355e5c9293c712b5df65896371af0ba71c19b2.tar.gz |
Load and process at most 100 commits when pushing into default branch
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/data_builder/push.rb | 4 |
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) |