CXP-383 Support audit log pagination for both GHEC and GHES - #192
Conversation
| // numeric "page=N" Link headers parse into Response.NextPage (int) instead, | ||
| // leaving NextPageToken empty. Checking only NextPageToken silently truncates | ||
| // GHES audit logs to a single page. | ||
| func nextAuditLogPage(resp *github.Response) string { |
There was a problem hiding this comment.
🟡 Suggestion: The new GHES numeric-page branch has no test coverage. TestUsageEventFeed_ListEvents_ContinuesPastAnAllFilteredPage only exercises the GHEC path (Link: <...?page=cursor2>; rel="next"), so the resp.NextPage fallback this PR adds would still pass if it regressed. Consider adding a sibling test whose mocked handler emits a numeric Link: <...?page=2>; rel="next" header and asserting the second request is issued with page=2. (confidence: high)
Connector PR Review: CXP-383 Support audit log pagination for both GHEC and GHESBlocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0 Review SummaryScanned the full PR diff (one file, Security IssuesNone found. Correctness IssuesNone found. Suggestions
Prompt for AI agents |
The pagination token on GHEC and GHES is different for each. So this PR adds support to both of them