mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-06 11:52:55 +02:00
Remove pagination from context (#807)
Pagination related flags now write directly to ListOption struct and enforce non negative numbers. Flag tests were added to cover the validation Reviewed-on: https://gitea.com/gitea/tea/pulls/807 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: TheFox0x7 <thefox0x7@gmail.com> Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
This commit is contained in:
@ -7,6 +7,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/tea/cmd/flags"
|
||||
"code.gitea.io/tea/modules/context"
|
||||
"code.gitea.io/tea/modules/task"
|
||||
"code.gitea.io/tea/modules/utils"
|
||||
@ -43,7 +44,7 @@ func getPullIndex(ctx *context.TeaContext, branch string) (int64, error) {
|
||||
c := ctx.Login.Client()
|
||||
opts := gitea.ListPullRequestsOptions{
|
||||
State: gitea.StateOpen,
|
||||
ListOptions: ctx.GetListOptions(),
|
||||
ListOptions: flags.GetListOptions(),
|
||||
}
|
||||
selected := ""
|
||||
loadMoreOption := "PR not found? Load more PRs..."
|
||||
|
Reference in New Issue
Block a user