mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 07:27:43 +00:00
Update backend/src/services/app-connection/github/github-connection-fns.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
greptile-apps[bot]
parent
b6b9fb6ef5
commit
352ef050c3
@@ -200,7 +200,7 @@ export const makePaginatedGitHubRequest = async <T, R = T[]>(
|
|||||||
const linkHeader = parseGitHubLinkHeader(firstResponse.headers.link as string | undefined);
|
const linkHeader = parseGitHubLinkHeader(firstResponse.headers.link as string | undefined);
|
||||||
const lastPageUrl = linkHeader.last;
|
const lastPageUrl = linkHeader.last;
|
||||||
|
|
||||||
// If there's a last page URL, get it's page number and concurrently fetch every page starting from 2 to last
|
// If there's a last page URL, get its page number and concurrently fetch every page starting from 2 to last
|
||||||
if (lastPageUrl) {
|
if (lastPageUrl) {
|
||||||
const lastPageParam = new URL(lastPageUrl).searchParams.get("page");
|
const lastPageParam = new URL(lastPageUrl).searchParams.get("page");
|
||||||
const totalPages = lastPageParam ? parseInt(lastPageParam, 10) : 1;
|
const totalPages = lastPageParam ? parseInt(lastPageParam, 10) : 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user