[BUG] Repository health treats unmeasured signals as zero

Đang mở
#4,081 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Dhruvdesai793 đang làm issue này rồi.

Từ ngày 3/12/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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.
Ngôn ngữ chính
TypeScript
Star
246
Fork
436
Merge trung bình
9 giờ 33 phút
Pull request đã merge (30 ngày)
213

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Priyanshu-byte-coder/devtrack

Tất cả issue của Priyanshu-byte-coder/devtrack

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.