Skip to content

fix: only count open issues/PRs in governance audit#123

Open
piyushagarwal-55 wants to merge 1 commit into
AOSSIE-Org:mainfrom
piyushagarwal-55:fix/governance-open-state-filter
Open

fix: only count open issues/PRs in governance audit#123
piyushagarwal-55 wants to merge 1 commit into
AOSSIE-Org:mainfrom
piyushagarwal-55:fix/governance-open-state-filter

Conversation

@piyushagarwal-55

@piyushagarwal-55 piyushagarwal-55 commented Jul 23, 2026

Copy link
Copy Markdown

The Dead Issues and Zombie PRs stats fetch issues with state=all but never
filter 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 in
GovernancePage.jsx so only currently-open items are counted.

Addressed Issues:

Fixes #122

Screenshots/Recordings:

Before / After (auditing reduxjs):

Metric Before After
Dead Issues 257 58
Zombie PRs 511 40

After Screenshot
Screenshot 2026-07-23 143739

Additional Notes:

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

Checklist

  • My code follows the project's code style and conventions
  • I have made corresponding changes to the documentation (N/A — no docs affected)
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR
  • I have read the Contributing Guidelines

Summary by CodeRabbit

  • Refactor
    • Reformatted internal health-check list processing without changing functionality or user-visible behavior.

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>
Copilot AI review requested due to automatic review settings July 23, 2026 09:33
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9eab335d-bdc0-4048-8eee-08c77bfd4165

📥 Commits

Reviewing files that changed from the base of the PR and between 3dab61e and d745288.

📒 Files selected for processing (1)
  • src/pages/GovernancePage.jsx

Walkthrough

Reformats the deadIssues and zombiePRs health-check chains in GovernancePage without changing filtering, sorting, calculations, or control flow.

Changes

Governance health-check formatting

Layer / File(s) Summary
Health-check chain formatting
src/pages/GovernancePage.jsx
The deadIssues and zombiePRs filter/sort chains are reformatted while retaining their existing behavior.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • AOSSIE-Org/OrgExplorer#95: Also modifies Governance page health-check issue-list logic, while introducing stale-issues ratio functionality.

Suggested reviewers: copilot, ri1tik

Poem

I’m a small rabbit, hopping through lines,
Tidying chains into cleaner designs.
Filters stay steady, sorts keep their beat,
Two health checks look neat and sweet.
Nibble, reformat, retreat!

🚥 Pre-merge checks | ✅ 1 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title describes a functional fix that is not reflected in the diff, which only reformats code. Rename the title to match the actual change, or update the code to add the open-state filters it describes.
Linked Issues check ⚠️ Warning The PR does not implement the linked issue's required open-state filtering for Dead Issues and Zombie PRs. Add i.state === 'open' to both GovernancePage filters so only open issues and PRs are counted.
Out of Scope Changes check ⚠️ Warning The only changes are formatting tweaks in GovernancePage and do not address the requested governance audit fix. Remove the unrelated formatting-only edits or include the missing functional filter changes requested by the issue.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added frontend Frontend changes javascript JavaScript/TypeScript changes size/XS 1-10 lines changed first-time-contributor First time contributor labels Jul 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 no pull_request.
  • Filter “Zombie PRs” to only include items with state === 'open' and a pull_request.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions Bot added size/XS 1-10 lines changed and removed size/XS 1-10 lines changed labels Jul 23, 2026
@piyushagarwal-55

Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first-time-contributor First time contributor frontend Frontend changes javascript JavaScript/TypeScript changes size/XS 1-10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Governance audit counts CLOSED issues/PRs as "Dead Issues" and "Zombie PRs"

2 participants