[BUG]: Governance "Issue Resolution Rate" counts pull requests as issues
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 86/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github, javascript, react
Research direction
In src/pages/GovernancePage.jsx, inspect the Issue Resolution Rate calculation around lines 338–343 and compare its filtering with the governance checks cited in the issue. Exclude pull requests from the repo issue list, then verify that the card’s denominator and rate use issues only; the reported OrgExplorer example should count 44 issues rather than 100 fetched items.
Written by the indexing model from the issue text.
Description
Bug Description
The Governance "Issue Resolution Rate" card computes each repo's rate from GitHub's
/issues data without excluding pull requests. GitHub's /issues?state=all returns PRs as
well as issues (every PR is also an issue object, identified by a pull_request key), so
merged/closed PRs are counted as resolved issues and the rate is wrong.
In src/pages/GovernancePage.jsx (~lines 338-343):
const repoIssues = allIssues.filter(i => i.repoName === r.name)
const closed = repoIssues.filter(i => i.state === 'closed').length
const total = repoIssues.length
const rate = total ? Math.round(closed / total * 100) : null
allIssues (built ~lines 107-114) includes PRs and is never filtered with !i.pull_request.
Every other governance check DOES filter PRs out — Dead Issues (line 126), Zombie PRs
(line 144), and the stale-issues stats (AppContext.jsx line 422) — so this widget is the
outlier.
Verified on live data for AOSSIE-Org/OrgExplorer (first 100 of state=all): 56 of the 100
"issues" are actually PRs, so the denominator is inflated 44 -> 100 and the rate reads 42%
instead of the correct 39%.
Steps to Reproduce
- Explore any active org (e.g. AOSSIE-Org) and open the Governance page.
- Click "Run Audit".
- Look at the "Issue Resolution Rate" bars — closed/total includes pull requests.
- Compare any repo's number with GitHub's real issue count and it won't match.
Deterministic check (same logic as the page, on live data):
node f1_resolution.mjs
# fetched items (issues + PRs): 100 (PRs among them: 56)
# CURRENT (buggy, counts PRs) : 42/100 closed -> 42%
# CORRECT (issues only) : 17/44 closed -> 39%
Logs and Screenshots
Reproducible script output (replicates GovernancePage.jsx:338-343 on live GitHub data):
=== F1 Issue Resolution Rate — AOSSIE-Org/OrgExplorer (first 100 of state=all) ===
fetched items (issues + PRs): 100 (PRs among them: 56)
CURRENT (buggy, counts PRs) : 42/100 closed -> 42%
CORRECT (issues only) : 17/44 closed -> 39%
=> PRs inflate the denominator by 56 and skew the rate by 3 points.
📎 Image file:
Environment Details
- OS: macOS (also reproduces on the live site, any OS/browser)
- Browser: Chrome
- Site: https://orgexplorer.aossie.org/ and local dev (npm run dev), main @ d91d2b8
- Node.js: v20 (for the repro script)
- Suggested fix: add
&& !i.pull_requestto the repoIssues filter. - Related but separate: #302's open PR #304 rewrites this exact line for org-scoping
(issuesData?.[${r.orgLogin}/${r.name}] || []) but still counts PRs — so this defect
survives #304 and should be fixed on top of / within that change.
Impact
Medium - Feature works but has issues
Code of Conduct
- I have joined the Discord server and will post updates there
- I have searched existing issues to avoid duplicates
- Dominant language
- JavaScript
- Stars
- 53
- Forks
- 187
- Avg merge
- 18m
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AOSSIE-Org/OrgExplorer
-
[BUG]: Organization filter dropdown in AnalyticsPage renders empty list due to truthy evaluation of empty issuesDataPossibly taken @havyasreekuppam claimed this 5 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
AOSSIE-Org/OrgExplorer#476 · 5 comments ·
Maintainers usually reply within 1 day
-
Add Pat for 5000 req/hr button not visible when pat expiresPossibly taken @Rajvardhan-Singh-Rathore claimed this 6 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AOSSIE-Org/OrgExplorer#473 · 6 comments ·
Maintainers usually reply within 1 day
-
[BUG]: PAT popup input lacks label association and visibility button lacks an accessible namePossibly taken @prasanm1423 claimed this 10 days ago. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AOSSIE-Org/OrgExplorer#466 · 2 comments ·
Maintainers usually reply within 1 day
-
[FEATURE]: Set dynamic document.title based on active page routePossibly taken @23241a6749 claimed this 8 days ago. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AOSSIE-Org/OrgExplorer#462 · 2 comments ·
Maintainers usually reply within 1 day
-
[BUG]: SocialShareButton logs unconditional console.warn when script is not loadedPossibly taken @vivekrajputofficial29-afk claimed this 8 days ago. Openbug enhancement
Difficulty 1/5 Under an hour Newbie friendliness 89/100
AOSSIE-Org/OrgExplorer#461 · 1 comment ·
Maintainers usually reply within 1 day
All issues in AOSSIE-Org/OrgExplorer
Similar issues
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Kanevry/session-orchestrator#108 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
awesomemotive/all-in-one-seo-pack#3238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
andromarces/agent-loops#2055 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days