Contributor login constructor crashes analytical model construction

Abierto
#417 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Shubham-Padkonde ya está trabajando en esto.

Desde el 26/10/2026.

  • #418 de @Shubham-Padkonde — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
javascript, node.js

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
JavaScript
Estrellas
53
Forks
187
Merge medio
18 min
PR fusionados (30 d)
2

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

Todos los issues de AOSSIE-Org/OrgExplorer

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.