From d74528805d98d1d999694d0b4d313e4bc315776c Mon Sep 17 00:00:00 2001 From: piyushagarwal-55 Date: Thu, 23 Jul 2026 09:14:58 +0000 Subject: [PATCH] fix: only count open issues/PRs in governance audit The Dead Issues and Zombie PRs stats fetch issues with `state=all` but never filtered by state, so closed and merged items 90+ days old were counted despite the "OPEN 90+ DAYS" / "PENDING 90+ DAYS" labels. This massively inflated the counts (e.g. auditing reduxjs showed 511 zombie PRs when only 40 were actually open). Add `i.state === 'open'` to both the deadIssues and zombiePRs filters in GovernancePage.jsx so only currently-open items are counted. Fixes #122 Co-Authored-By: Claude Opus 4.8 --- src/pages/GovernancePage.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/GovernancePage.jsx b/src/pages/GovernancePage.jsx index cba5a7e..7a209f6 100644 --- a/src/pages/GovernancePage.jsx +++ b/src/pages/GovernancePage.jsx @@ -71,7 +71,7 @@ export default function GovernancePage() { // Health check 1 — Dead Issues (>90 days open, not a PR) const deadIssues = allIssues - .filter(i => !i.pull_request && daysSince(i.created_at) >= 90) + .filter(i => !i.pull_request && i.state === 'open' && daysSince(i.created_at) >= 90) .sort((a, b) => daysSince(b.created_at) - daysSince(a.created_at)) // Health check 2 — Percentage of dead issues relative to all issues @@ -79,7 +79,7 @@ export default function GovernancePage() { // Health check 3 — Zombie PRs (>90 days open) const zombiePRs = allIssues - .filter(i => i.pull_request && daysSince(i.created_at) >= 90) + .filter(i => i.pull_request && i.state === 'open' && daysSince(i.created_at) >= 90) .sort((a, b) => daysSince(b.created_at) - daysSince(a.created_at)) // Health check 4 — No license