chore(tools): centralize pagination cap helper
This commit is contained in:
@@ -60,9 +60,7 @@ func (t *RepoSearch) Call(ctx context.Context, raw json.RawMessage) (json.RawMes
|
||||
if args.Page < 1 {
|
||||
args.Page = 1
|
||||
}
|
||||
if args.Limit < 1 || args.Limit > 50 {
|
||||
args.Limit = 30
|
||||
}
|
||||
args.Limit = capLimit(args.Limit, 30)
|
||||
|
||||
repos, err := t.c.SearchRepos(ctx, args.Q, args.Owner, args.Page, args.Limit)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user