mirror of
				https://gitea.com/gitea/tea.git
				synced 2025-10-31 09:15:26 +01: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:
		| @@ -65,14 +65,14 @@ func RunReposList(_ stdctx.Context, cmd *cli.Command) error { | ||||
| 			return err | ||||
| 		} | ||||
| 		rps, _, err = client.SearchRepos(gitea.SearchRepoOptions{ | ||||
| 			ListOptions:     teaCmd.GetListOptions(), | ||||
| 			ListOptions:     flags.GetListOptions(), | ||||
| 			StarredByUserID: user.ID, | ||||
| 		}) | ||||
| 	} else if teaCmd.Bool("watched") { | ||||
| 		rps, _, err = client.GetMyWatchedRepos() // TODO: this does not expose pagination.. | ||||
| 	} else { | ||||
| 		rps, _, err = client.ListMyRepos(gitea.ListReposOptions{ | ||||
| 			ListOptions: teaCmd.GetListOptions(), | ||||
| 			ListOptions: flags.GetListOptions(), | ||||
| 		}) | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 TheFox0x7
					TheFox0x7