ListFunctions: option to disable pagination #509
No reviewers
Labels
No Label
has/backport
has/pull
in progress
invalid
kind/breaking
kind/bug
kind/build
kind/deployment
kind/docs
kind/enhancement
kind/feature
kind/lint
kind/proposal
kind/question
kind/refactor
kind/security
kind/testing
kind/translation
kind/ui
need/backport
priority/critical
priority/low
priority/maybe
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/go-sdk#509
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "6543/go-sdk:be-able-to-disable-pagination"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
the sdk enforce pagination, but most list endpoints dont require it ...
close #507 fully
tests: infinety loop :/
@ -30,2 +30,3 @@
// if you set -1 as page it will set all to 0
func (o *ListOptions) setDefaults() {
if o.Page < 1 {
if o.Page > 0 {
do you mean
o.Page < 0
?just need to double check that setDefaults never gets ran twice.
@ -31,1 +32,3 @@
if o.Page < 1 {
if o.Page < 0 {
o.Page, o.PageSize = 0, 0
return
This will only really work if setDefaults can never be called twice otherwise you'll get weird effects.
There may be a better way of ensuring this.