Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab
Commits
39243ea3
Commit
39243ea3
authored
2 years ago
by
Vasilii Iakliushin
Browse files
Options
Downloads
Patches
Plain Diff
Add feature flag to pagination params
parent
75256bde
No related branches found
No related tags found
1 merge request
!93571
Don't allow negative values for pagination
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/feature_flags/development/only_positive_pagination_values.yml
+8
-0
8 additions, 0 deletions
...ure_flags/development/only_positive_pagination_values.yml
lib/api/pagination_params.rb
+3
-1
3 additions, 1 deletion
lib/api/pagination_params.rb
with
11 additions
and
1 deletion
config/feature_flags/development/only_positive_pagination_values.yml
0 → 100644
+
8
−
0
View file @
39243ea3
---
name
:
only_positive_pagination_values
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/93571
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/369225
milestone
:
'
15.3'
type
:
development
group
:
group::source code
default_enabled
:
false
This diff is collapsed.
Click to expand it.
lib/api/pagination_params.rb
+
3
−
1
View file @
39243ea3
...
...
@@ -17,7 +17,9 @@ module PaginationParams
included
do
helpers
do
params
:pagination
do
with
(
type:
Integer
,
values:
->
(
v
)
{
!
v
.
is_a?
(
Integer
)
||
v
>
0
})
do
with
(
type:
Integer
,
values:
->
(
v
)
do
!
v
.
is_a?
(
Integer
)
||
Feature
.
disabled?
(
:only_positive_pagination_values
)
||
v
>
0
end
)
do
optional
:page
,
default:
1
,
desc:
'Current page number'
optional
:per_page
,
default:
20
,
desc:
'Number of items per page'
end
...
...
This diff is collapsed.
Click to expand it.
Quang-Minh Nguyen
@qmnguyen0711
mentioned in issue
gitaly#4646 (closed)
·
2 years ago
mentioned in issue
gitaly#4646 (closed)
mentioned in issue gitaly#4646
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment