We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3cab7b1 commit f701670Copy full SHA for f701670
1 file changed
pkg/github/server.go
@@ -246,18 +246,9 @@ type UnifiedPaginationParams struct {
246
// ToGraphQLParams converts REST API pagination parameters to GraphQL-specific parameters.
247
// This converts page/perPage to first parameter for GraphQL queries.
248
func (u UnifiedPaginationParams) ToGraphQLParams() GraphQLPaginationParams {
249
- // Cap perPage to safe range before converting to int32
250
- perPage := u.PerPage
251
- if perPage > 100 { // GraphQL expects a max of 100
252
- perPage = 100
253
- }
254
- if perPage < 1 {
255
- perPage = 1
256
257
- first := int32(perPage)
258
-
+ first := int32(u.PerPage)
259
return GraphQLPaginationParams{
260
- First: &first,
+ First: &first, //nolint:gosec // G115: This is safe, we cap perPage to 100 in the toolset
261
}
262
263
0 commit comments