[BUG]: Top-repository scoring double-counts stars via watchers_count
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- github, javascript, node.js
Línea de trabajo
Empieza en src/services/analytics.js, alrededor de las líneas 194–198, y sigue cómo getTopRepositories() calcula las puntuaciones y selecciona los 10 primeros. El informe señala la contribución duplicada de watchers_count e incluye una reproducción en Node.js en f2_watchers.mjs; ejecútala para comparar las clasificaciones. El trabajo estará terminado cuando se elimine la ponderación duplicada de estrellas y se seleccione la lista corregida de los 10 primeros.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug Description
getTopRepositories() scores repos with:
score = stargazers_count + forks_count*2 + watchers_count*1.5 + activityBonus
(src/services/analytics.js, ~lines 194-198)
On the GitHub REST API, watchers_count is a duplicate of stargazers_count (both are the
star count); the real watcher/subscriber count is subscribers_count, which the repos list
endpoint doesn't even return. So the formula is effectively stars2.5 + forks2 + ... —
stars are silently weighted 2.5x, and the intended "watchers" signal contributes nothing.
This matters because getTopRepositories(..., 10) selects the top 10 repos per org in standard
(no-PAT) mode, and that selection feeds Repositories, Contributors, Network, Governance and
Analytics (AppContext.jsx lines 227, 282).
Live proof (2026-10-22):
- GET api.github.com/repos/facebook/react -> stargazers_count 251692, watchers_count 251692
(identical), subscribers_count 6610. - Running the real getTopRepositories on AOSSIE-Org's 87 repos, the buggy top-10 includes
"Devr.AI" where a stars-only (corrected) top-10 picks "BabyNest" — the duplicate-stars term
actually changes which repos are selected.
Steps to Reproduce
-
Open api.github.com/repos/facebook/react and note watchers_count == stargazers_count,
while subscribers_count is much smaller. -
Run the repro (imports the project's real getTopRepositories):
node f2_watchers.mjs
watchers_count === stargazers_count : true
current top-10: [...,"OrgExplorer","Devr.AI"]
corrected top-10: [...,"OrgExplorer","BabyNest"] <- ranking changes
Logs and Screenshots
=== F2.1 GitHub API fact (facebook/react) ===
stargazers_count : 251692
watchers_count : 251692 <-- identical to stars
subscribers_count: 6610 <-- the REAL watcher count
watchers_count === stargazers_count : true
=== F2.2 Top-10 selection for AOSSIE-Org (87 repos) ===
current (with watchers_count*1.5): [...,"OrgExplorer","Devr.AI"]
corrected(watchers term removed) : [...,"OrgExplorer","BabyNest"]
positions that differ: ["Devr.AI"]
📎 Image file:
Environment Details
- OS: macOS (API behaviour is platform-independent)
- Browser: Chrome
- Repo: main @ d91d2b8, src/services/analytics.js getTopRepositories()
- Node.js: v20 (for the repro script)
- Suggested fix: drop the watchers_count term (it duplicates stars). subscribers_count would
be the real signal but isn't on the list endpoint, so removing the term is the simplest fix.
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
- Lenguaje dominante
- JavaScript
- Estrellas
- 45
- Forks
- 148
- Merge medio
- 5 d 20 h
- PR fusionados (30 d)
- 27
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de AOSSIE-Org/OrgExplorer
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
AOSSIE-Org/OrgExplorer#402 ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
AOSSIE-Org/OrgExplorer#401 ·
Los mantenedores suelen responder en 3 días
-
[BUG]: Overview wrongly lists a successfully-loaded org as "could not be loaded" (case / duplicate)Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
AOSSIE-Org/OrgExplorer#400 ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
AOSSIE-Org/OrgExplorer#398 ·
Los mantenedores suelen responder en 3 días
-
[BUG]: Eliminate render-blocking CDN stylesheet for SocialShareButton in index.htmlPosiblemente ocupada @garv3143 la tomó hace 1 día. Abiertobug enhancement
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
AOSSIE-Org/OrgExplorer#395 · 1 comentario ·
Los mantenedores suelen responder en 3 días
Todos los issues de AOSSIE-Org/OrgExplorer
Issues similares
-
type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Update to mocha 12.xAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
rescript-lang/rescript#8996 ·
Los mantenedores suelen responder en 1 día
-
Add: Ministerstvoidey.ruAbiertocheck:passed logos:add
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100