@@ -57160,7 +57160,7 @@ var RequestError = class extends Error {
5716057160};
5716157161
5716257162//
57163- var VERSION2 = "0 .0.0-development ";
57163+ var VERSION2 = "10 .0.3 ";
5716457164var defaults_default = {
5716557165 headers: {
5716657166 "user-agent": `octokit-request.js/${VERSION2} ${getUserAgent()}`
@@ -60479,15 +60479,17 @@ function normalizePaginatedListResponse(response) {
6047960479 data: []
6048060480 };
6048160481 }
60482- const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data);
60482+ const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data) || "total_commits" in response.data ;
6048360483 if (!responseNeedsNormalization)
6048460484 return response;
6048560485 const incompleteResults = response.data.incomplete_results;
6048660486 const repositorySelection = response.data.repository_selection;
6048760487 const totalCount = response.data.total_count;
60488+ const totalCommits = response.data.total_commits;
6048860489 delete response.data.incomplete_results;
6048960490 delete response.data.repository_selection;
6049060491 delete response.data.total_count;
60492+ delete response.data.total_commits;
6049160493 const namespaceKey = Object.keys(response.data)[0];
6049260494 const data = response.data[namespaceKey];
6049360495 response.data = data;
@@ -60498,6 +60500,7 @@ function normalizePaginatedListResponse(response) {
6049860500 response.data.repository_selection = repositorySelection;
6049960501 }
6050060502 response.data.total_count = totalCount;
60503+ response.data.total_commits = totalCommits;
6050160504 return response;
6050260505}
6050360506function iterator(octokit, route, parameters) {
@@ -60517,6 +60520,16 @@ function iterator(octokit, route, parameters) {
6051760520 url = ((normalizedResponse.headers.link || "").match(
6051860521 /<([^<>]+)>;\s*rel="next"/
6051960522 ) || [])[1];
60523+ if (!url && "total_commits" in normalizedResponse.data) {
60524+ const parsedUrl = new URL(normalizedResponse.url);
60525+ const params4 = parsedUrl.searchParams;
60526+ const page = parseInt(params4.get("page") || "1", 10);
60527+ const per_page = parseInt(params4.get("per_page") || "250", 10);
60528+ if (page * per_page < normalizedResponse.data.total_commits) {
60529+ params4.set("page", String(page + 1));
60530+ url = parsedUrl.toString();
60531+ }
60532+ }
6052060533 return { value: normalizedResponse };
6052160534 } catch (error2) {
6052260535 if (error2.status !== 409)
0 commit comments