Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0eb670c4
Commit
0eb670c4
authored
Dec 02, 2020
by
Igor Drozdov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce keyset pagination for Branches API
parent
fc5df2d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
config/feature_flags/development/branch_list_keyset_pagination.yml
...ature_flags/development/branch_list_keyset_pagination.yml
+2
-2
lib/gitlab/pagination/gitaly_keyset_pager.rb
lib/gitlab/pagination/gitaly_keyset_pager.rb
+2
-2
No files found.
config/feature_flags/development/branch_list_keyset_pagination.yml
View file @
0eb670c4
---
name
:
branch_list_keyset_pagination
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35819
rollout_issue_url
:
rollout_issue_url
:
milestone
:
'
13.2'
type
:
development
group
:
group::source code
default_enabled
:
fals
e
default_enabled
:
tru
e
lib/gitlab/pagination/gitaly_keyset_pager.rb
View file @
0eb670c4
...
...
@@ -26,11 +26,11 @@ module Gitlab
private
def
keyset_pagination_enabled?
Feature
.
enabled?
(
:branch_list_keyset_pagination
,
project
)
&&
params
[
:pagination
]
==
'keyset'
Feature
.
enabled?
(
:branch_list_keyset_pagination
,
project
,
default_enabled:
true
)
&&
params
[
:pagination
]
==
'keyset'
end
def
paginate_first_page?
Feature
.
enabled?
(
:branch_list_keyset_pagination
,
project
)
&&
(
params
[
:page
].
blank?
||
params
[
:page
].
to_i
==
1
)
Feature
.
enabled?
(
:branch_list_keyset_pagination
,
project
,
default_enabled:
true
)
&&
(
params
[
:page
].
blank?
||
params
[
:page
].
to_i
==
1
)
end
def
paginate_via_gitaly
(
finder
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment