Content-Length: 281197 | pFad | http://github.com/github/github-mcp-server/commit/f701670c9a9fb67b323422f128e8dc4c5c46ddbc

29 add nolint · github/github-mcp-server@f701670 · GitHub
Skip to content

Commit f701670

Browse files
committed
add nolint
1 parent 3cab7b1 commit f701670

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

pkg/github/server.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -246,18 +246,9 @@ type UnifiedPaginationParams struct {
246246
// ToGraphQLParams converts REST API pagination parameters to GraphQL-specific parameters.
247247
// This converts page/perPage to first parameter for GraphQL queries.
248248
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-
249+
first := int32(u.PerPage)
259250
return GraphQLPaginationParams{
260-
First: &first,
251+
First: &first, //nolint:gosec // G115: This is safe, we cap perPage to 100 in the toolset
261252
}
262253
}
263254

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/github/github-mcp-server/commit/f701670c9a9fb67b323422f128e8dc4c5c46ddbc

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy