INNER CODE UNIT · JavaScript
remaining
EdgeTypE/better-deepseek · src/background/index.js:363
const remaining = normalizedCount - commits.length;
const perPage = Math.min(GITHUB_COMMITS_PAGE_SIZE, remaining);
const url = buildGithubCommitsUrl(
safeOwner,
safeRepo,
safeBranch,
perPage,
page,
);
const resp = await fetch(url, {
headers: buildGithubApiHeaders(trimmedToken),
});
if (!resp.ok) {
const bodyText = await resp.text();
if (isGithubRateLimitResponse(resp, bodyText)) {
throw createGithubFetchError(