(args map[string]any)
| 1482 | } |
| 1483 | |
| 1484 | func 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 |
| 1513 | func resolveIssueNodeID(ctx context.Context, gqlClient *githubv4.Client, owner, repo string, issueNumber int) (githubv4.ID, error) { |
no test coverage detected