Contributor login constructor crashes analytical model construction

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

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

@Shubham-Padkonde đang làm issue này rồi.

Từ ngày 26/10/2026.

  • #418 của @Shubham-Padkonde — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, node.js
Lĩnh vực
analytics, backend

Hướng nghiên cứu

Start in src/services/analytics.js at buildAnalyticalModel() and read the existing analytical-model tests. Reproduce with the supplied input containing the login constructor, then add coverage for inherited-property names and aggregation across repositories. Done when construction returns the contributor with the expected contribution and the existing output shape and sorting remain intact.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
Bug Description

buildAnalyticalModel() crashes when a repository has a contributor whose login is constructor (a valid GitHub username). The contributor accumulator is a plain object, so contributorMap[login] finds an inherited property and skips initializing the contributor record. It then fails at entry.repos.push(...), aborting the analysis.

Steps to Reproduce

Run from the repository root with Node:

import { buildAnalyticalModel } from './src/services/analytics.js'
const repos = { demo: [{ name: 'repo', pushed_at: '2026-10-01T00:00:00Z', open_issues_count: 0 }] }
buildAnalyticalModel(
  [{ login: 'demo' }],
  repos,
  { 'demo/repo': [{ login: 'constructor', contributions: 1 }] },
  repos,
)

Expected: one contributor named constructor with one contribution.
Actual: TypeError: Cannot read properties of undefined (reading 'push').

Proposed fix

I plan to use a null-prototype object for this accumulator and extend the existing analytical-model tests to cover inherited-property names, including aggregation across repositories. This keeps the existing output shape and sorting behavior.

Environment: Windows, Node 24.15.0, current main. No browser credentials or live repository writes are needed to reproduce this.

AI disclosure: Codex (GPT-6) investigated and reproduced this issue and drafted this report on my behalf. This text has not had prior human review.

Ngôn ngữ chính
JavaScript
Star
53
Fork
187
Merge trung bình
18 phút
Pull request đã merge (30 ngày)
2

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 AOSSIE-Org/OrgExplorer

Tất cả issue của AOSSIE-Org/OrgExplorer

Issue tương tự

Thêm issue về JavaScript

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.