mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-04 10:58:29 +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:
@ -85,7 +85,7 @@ func RunIssuesList(_ stdctx.Context, cmd *cli.Command) error {
|
||||
var issues []*gitea.Issue
|
||||
if ctx.Repo != "" {
|
||||
issues, _, err = ctx.Login.Client().ListRepoIssues(owner, ctx.Repo, gitea.ListIssueOption{
|
||||
ListOptions: ctx.GetListOptions(),
|
||||
ListOptions: flags.GetListOptions(),
|
||||
State: state,
|
||||
Type: kind,
|
||||
KeyWord: ctx.String("keyword"),
|
||||
@ -103,7 +103,7 @@ func RunIssuesList(_ stdctx.Context, cmd *cli.Command) error {
|
||||
}
|
||||
} else {
|
||||
issues, _, err = ctx.Login.Client().ListIssues(gitea.ListIssueOption{
|
||||
ListOptions: ctx.GetListOptions(),
|
||||
ListOptions: flags.GetListOptions(),
|
||||
State: state,
|
||||
Type: kind,
|
||||
KeyWord: ctx.String("keyword"),
|
||||
|
Reference in New Issue
Block a user