[BUG] Repository health treats unmeasured signals as zero

Abierto
#4,081 2 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@Dhruvdesai793 ya está trabajando en esto.

Desde el 3/12/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

bug needs-triage status:assigned
What happened?

On Dashboard → Repository Health, the API reports contributorCount: 0 and documentationScore: 0 for every repository. These are hard-coded in the route, then passed into the health score as if they were measured values. Both signals contribute up to 10 points, so every repo loses up to 20 points and is shown with zero contributors and a zero documentation score even when those signals are simply not collected.

Expected: calculate these signals from GitHub, or mark them unavailable and exclude them from scoring until they can be measured. Unknown data should not be reported as zero.

Source: the route returns both constants; the scorer includes both metrics and adds them to the total at lines 65–72.

Steps to reproduce
  1. Sign in and open Dashboard → Repository Health.
  2. Load any repository.
  3. Inspect GET /api/metrics/repo-health?days=30.
  4. The response reports contributorCount: 0 and documentationScore: 0 for every repository, and the score uses those values.
Where is it?

Dashboard overview

Where did you see it?

Local development

Browser and device

Not browser-specific; server-side API data.

Screenshots, console errors or logs

No screenshot or runtime log applies. Source-level proof is linked above. I did not run tests for this report to avoid using the shared checkout while another contributor is working. Existing test/repo-health-scoring.test.ts tests the scorer with supplied values; it does not exercise the API route or verify how missing signals are represented. A route test should confirm these values are calculated or treated as unavailable instead of serialized as zero.

Want to fix it?
  • I'd like to work on this. A maintainer will assign you; please don't start before that.
Lenguaje dominante
TypeScript
Estrellas
246
Forks
436
Merge medio
9 h 33 min
PR fusionados (30 d)
213

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Priyanshu-byte-coder/devtrack

Todos los issues de Priyanshu-byte-coder/devtrack

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.