MCPcopy
hub / github.com/github/github-mcp-server / OptionalCursorPaginationParams

Function OptionalCursorPaginationParams

pkg/github/params.go:418–431  ·  view source on GitHub ↗

OptionalCursorPaginationParams returns the "perPage" and "after" parameters from the request, without the "page" parameter, suitable for cursor-based pagination only.

(args map[string]any)

Source from the content-addressed store, hash-verified

416// OptionalCursorPaginationParams returns the "perPage" and "after" parameters from the request,
417// without the "page" parameter, suitable for cursor-based pagination only.
418func OptionalCursorPaginationParams(args map[string]any) (CursorPaginationParams, error) {
419 perPage, err := OptionalIntParamWithDefault(args, "perPage", 30)
420 if err != nil {
421 return CursorPaginationParams{}, err
422 }
423 after, err := OptionalParam[string](args, "after")
424 if err != nil {
425 return CursorPaginationParams{}, err
426 }
427 return CursorPaginationParams{
428 PerPage: perPage,
429 After: after,
430 }, nil
431}
432
433type CursorPaginationParams struct {
434 PerPage int

Callers 7

GetFileBlameFunction · 0.85
ListIssuesFunction · 0.85
ListDiscussionsFunction · 0.85
GetDiscussionCommentsFunction · 0.85
ListDependabotAlertsFunction · 0.85
PullRequestReadFunction · 0.85
IssueDependencyReadFunction · 0.85

Calls 1

Tested by

no test coverage detected