MCPcopy Index your code
hub / github.com/github/github-mcp-server / extractPaginationOptionsFromArgs

Function extractPaginationOptionsFromArgs

pkg/github/projects.go:1484–1510  ·  view source on GitHub ↗
(args map[string]any)

Source from the content-addressed store, hash-verified

1482}
1483
1484func extractPaginationOptionsFromArgs(args map[string]any) (github.ListProjectsPaginationOptions, error) {
1485 perPage, err := OptionalIntParamWithDefault(args, "per_page", MaxProjectsPerPage)
1486 if err != nil {
1487 return github.ListProjectsPaginationOptions{}, err
1488 }
1489 if perPage > MaxProjectsPerPage {
1490 perPage = MaxProjectsPerPage
1491 }
1492
1493 after, err := OptionalParam[string](args, "after")
1494 if err != nil {
1495 return github.ListProjectsPaginationOptions{}, err
1496 }
1497
1498 before, err := OptionalParam[string](args, "before")
1499 if err != nil {
1500 return github.ListProjectsPaginationOptions{}, err
1501 }
1502
1503 opts := github.ListProjectsPaginationOptions{
1504 PerPage: perPage,
1505 After: after,
1506 Before: before,
1507 }
1508
1509 return opts, nil
1510}
1511
1512// resolveIssueNodeID resolves an issue number to its GraphQL node ID
1513func resolveIssueNodeID(ctx context.Context, gqlClient *githubv4.Client, owner, repo string, issueNumber int) (githubv4.ID, error) {

Callers 3

listProjectsFunction · 0.85
listProjectFieldsFunction · 0.85
listProjectItemsFunction · 0.85

Calls 1

Tested by

no test coverage detected