fix: only count open issues/PRs in governance audit#123
fix: only count open issues/PRs in governance audit#123piyushagarwal-55 wants to merge 1 commit into
Conversation
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 AOSSIE-Org#122 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughReformats the ChangesGovernance health-check formatting
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (1 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Fixes governance audit metrics so “Dead Issues” and “Zombie PRs” only count currently open items, aligning the computed stats with the UI labels (“OPEN 90+ DAYS” / “PENDING 90+ DAYS”) and the data source behavior (state=all).
Changes:
- Filter “Dead Issues” to only include items with
state === 'open'and nopull_request. - Filter “Zombie PRs” to only include items with
state === 'open'and apull_request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Small clarification: this is a functional fix, not just formatting — it adds state === 'open' to both filters so closed/merged items are no longer counted (see the before/after numbers). CodeRabbit's summary called it a reformat, but the two filters now behave differently. |
The Dead Issues and Zombie PRs stats fetch issues with
state=allbut neverfilter by state, so closed and merged items 90+ days old were counted despite
the "OPEN 90+ DAYS" / "PENDING 90+ DAYS" labels. This inflated the counts
(e.g. auditing reduxjs showed 511 zombie PRs when only 40 were actually open).
Added
i.state === 'open'to both the deadIssues and zombiePRs filters inGovernancePage.jsxso only currently-open items are counted.Addressed Issues:
Fixes #122
Screenshots/Recordings:
Before / After (auditing
reduxjs):After Screenshot

Additional Notes:
The remaining items are genuinely open (e.g.
redux-mock-store#120 and #158are open PRs), so they are correctly still counted. Only closed/merged items
were removed.
Checklist
Summary by CodeRabbit