From fa01a142a8bd3eb9769e2d0ddac652d2fb205954 Mon Sep 17 00:00:00 2001 From: glorysr1209-png Date: Sun, 31 May 2026 21:57:07 -0400 Subject: [PATCH] fix: monolithic backfill openIssuesCount excludes pull requests --- src/github/backfill.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/github/backfill.ts b/src/github/backfill.ts index 3528484f45..296496d340 100644 --- a/src/github/backfill.ts +++ b/src/github/backfill.ts @@ -1300,6 +1300,7 @@ async function backfillRepository(env: Env, repo: RepositoryRecord, limits: Back warnings.push(...labels.warnings, ...issuePage.warnings, ...pullRequestPage.warnings, ...recentMergedPage.warnings); const issues = issuePage.items.filter((issue) => !issue.pull_request); + const openIssueCount = issues.length; const pullRequests = pullRequestPage.items; const recentMerged = recentMergedPage.items.filter((pr) => Boolean(pr.merged_at)); @@ -1378,7 +1379,7 @@ async function backfillRepository(env: Env, repo: RepositoryRecord, limits: Back primaryLanguage: metadata.language, defaultBranch: metadata.default_branch, isPrivate: metadata.private, - openIssuesCount: issuePage.fetchedCount, + openIssuesCount: openIssueCount, openPullRequestsCount: pullRequestPage.fetchedCount, recentMergedPullRequestsCount: recentMergedPage.fetchedCount, labelsSyncedAt: completedAt, @@ -1397,7 +1398,7 @@ async function backfillRepository(env: Env, repo: RepositoryRecord, limits: Back fetchedAt: completedAt, primaryLanguage: metadata.language, defaultBranch: metadata.default_branch, - openIssuesCount: issuePage.fetchedCount, + openIssuesCount: openIssueCount, openPullRequestsCount: pullRequestPage.fetchedCount, recentMergedPullRequestsCount: recentMergedPage.fetchedCount, payload: { @@ -1411,7 +1412,7 @@ async function backfillRepository(env: Env, repo: RepositoryRecord, limits: Back return { repoFullName: repo.fullName, status, - openIssues: issuePage.fetchedCount, + openIssues: openIssueCount, openPullRequests: pullRequestPage.fetchedCount, recentMergedPullRequests: recentMergedPage.fetchedCount, warnings,