Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[quality] handlePullReq's jobs-input error arms are never exercised end-to-end through dist/index.js

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

Los mantenedores suelen responder en 1 día

@hivecommons-hive ya está trabajando en esto.

Desde el 4/10/2026.

  • #310 de @hivecommons-hive — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
typescript
Área
testing

Línea de trabajo

Start with __tests__/bundle and read src/pullReq/handlePullReq.ts and src/pullReq/onPrLgtm.ts to understand the existing end-to-end test setup and the uncovered branches. Run npm run test:coverage:e2e to establish the baseline. Done when bundle-level tests exercise the listed jobs-input error cases and the coverage increases as described.

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

Descripción

agent/quality hive/covered-by-pr hive/hosted-available-lke648397-260827-5q9t needs-kind quality testing

Finding

src/pullReq/handlePullReq.ts runs the jobs input after the registered pull-request handlers. Three of its arms are reached by no __tests__/bundle suite, so the shipped bundle's behaviour on them is unmeasured:

  • lines 62-66: the lgtm job's catch (an onPrLgtm failure is returned as a value) and the default arm (could not execute <job>. May not be supported)
  • lines 75-80: the TypeError: error handling pull request: … rethrow and the core.setFailed that ends the run
  • src/pullReq/onPrLgtm.ts line 30: could not get labels from issue when the labels read fails

Evidence

  • Unit: npx vitest run --coverage on main @ 3fc21f2 — handlePullReq.ts 100 / 100 / 100 / 100, onPrLgtm.ts 100 / 100 / 100 / 100 (__tests__/pullReqTest/handlePullReq.test.ts, onPrLgtm.test.ts).
  • End-to-end: npm run test:coverage:e2e on main @ 3fc21f2 (Node v26.10.0, vitest 5.0.3, local run 2026-10-04) — handlePullReq.ts 80.76 % lines, uncovered 46,62-66,75-80; onPrLgtm.ts 83.33 % lines, uncovered 19,30.

Covered by unit tests but not end-to-end → medium.

Line 46 (jobs empty and no registered handlers) and onPrLgtm.ts line 19 (a pull_request payload without pull_request.number) are not reachable from a real pull_request event and are out of scope.

Recommendation

  • __tests__/bundle/pullReqJobsArms.test.ts: a pull_request synchronize run with an unsupported jobs entry fails naming the job after the handlers have run; one whose lgtm job's GET /issues/1 answers 500 fails with could not get labels from issue and deletes nothing; jobs: lgtm <unsupported> removes the label and still fails the run

Measured with that file: handlePullReq.ts 80.76 → 96.15 % e2e lines (only 46 left), onPrLgtm.ts 83.33 → 91.66 % (only 19 left).

Priority

  • Impact: medium
  • Effort: low

Filed by quality agent (hold-gated mode)


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 709cb6c

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

Lenguaje dominante
TypeScript
Estrellas
132
Forks
23
Merge medio
1 d 9 h
PR fusionados (30 d)
122

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 cncf/prow-github-actions

Todos los issues de cncf/prow-github-actions

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.