diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-09 21:07:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-09 21:07:50 +0300 |
commit | 20f6a17ba2d2d5f056bda38dfe85e2a7b2a82d0b (patch) | |
tree | 1319f393750fa7a212455746273c05465d786fde /app/models/commit_collection.rb | |
parent | e38a99eb0725697297386dd0bb1045b1fd55493a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/commit_collection.rb')
-rw-r--r-- | app/models/commit_collection.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/commit_collection.rb b/app/models/commit_collection.rb index a3ee8e4f364..7d89ddde0cb 100644 --- a/app/models/commit_collection.rb +++ b/app/models/commit_collection.rb @@ -13,10 +13,11 @@ class CommitCollection # container - The object the commits belong to. # commits - The Commit instances to store. # ref - The name of the ref (e.g. "master"). - def initialize(container, commits, ref = nil) + def initialize(container, commits, ref = nil, page: nil, per_page: nil, count: nil) @container = container @commits = commits @ref = ref + @pagination = Gitlab::PaginationDelegate.new(page: page, per_page: per_page, count: count) end def each(&block) @@ -113,4 +114,8 @@ class CommitCollection def method_missing(message, *args, &block) commits.public_send(message, *args, &block) end + + def next_page + @pagination.next_page + end end |