Commit cca0b3be authored by Phil Hughes's avatar Phil Hughes

Added maximum cap to batch size on API

parent c80bd1f0
......@@ -11,7 +11,7 @@ module Gitlab
#
class MergeRequestDiffBatch < MergeRequestDiffBase
DEFAULT_BATCH_PAGE = 1
DEFAULT_BATCH_SIZE = 20
DEFAULT_BATCH_SIZE = 30
attr_reader :pagination_data
......@@ -64,7 +64,7 @@ module Gitlab
def load_paginated_collection(batch_page, batch_size, diff_options)
batch_page ||= DEFAULT_BATCH_PAGE
batch_size ||= DEFAULT_BATCH_SIZE
batch_size = [batch_size.to_i, DEFAULT_BATCH_SIZE].min
paths = diff_options&.fetch(:paths, nil)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment