Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[quality] /assign's failure arms are never driven through dist/index.js

Aperta
#301 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@hivecommons-hive ci sta già lavorando.

Dal 4/10/2026.

  • #302 di @hivecommons-hive — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
github, typescript
Ambito
testing-qa

Direzione di ricerca

Read src/issueComment/assign.ts and the existing bundle.test.ts, then run npm run test:coverage:e2e to see the current coverage. The issue proposes adding tests/bundle/assignArms.test.ts and driving the three reachable failure arms through dist/index.js against the fake GitHub. Done means asserting exit 1, the ::error:: text, and the exact request sequence for each case; linked PR #302 is already open.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Finding

src/issueComment/assign.ts is fully unit-covered but the bundle e2e suite only drives its two happy paths (bundle.test.ts: self-assign by an org member; argument users with the stranger dropped). Its failure arms never run against the shipped bundle:

  • line 42 — could not self assign: the self-assign POST /issues/1/assignees is refused
  • line 66 — no authorized users found: every argument user fails the org-member / collaborator / has-commented reads
  • line 79 — could not add assignees: the argument-user POST /issues/1/assignees is refused

Two further uncovered lines are not reachable through dist/index.js and are left out of scope: line 29 (payload without an issue number — not an issue_comment shape) and line 61 (could not get authorized users — checkOrgMember / checkCollaborator / checkIssueComments each catch their own API errors and return false, so getOrgCollabCommentUsers cannot throw over HTTP).

Evidence

  • Unit: npx vitest run --coverage on main @ 3fc21f2 → assign.ts 100 % lines (suite: 100 / 99.81 / 100 / 100).
  • E2E: npm run test:coverage:e2e on main @ 3fc21f2 → assign.ts 81.48 % lines, uncovered 29,42,61,66,79.
  • Priority 2 per the lane's rule: unit-covered, e2e-uncovered.

Recommendation

  • new __tests__/bundle/assignArms.test.ts driving the three reachable arms through dist/index.js against the fake GitHub: refused self-assign write, no authorized argument users (no write issued), refused argument-user write — asserting exit 1, the ::error:: text, and the exact request sequence

Measured with that file: assign.ts e2e 81.48 % → 92.59 % lines (only 29 and 61 remain).

Cluster: src/issueComment/assign.ts failure arms, bundle e2e. Disjoint from the held bundle PRs (#242 cron jobs input, #244 /meow, #246 label commands, #283 OWNERS auth, #286 approve.github_review, #289 merge gate labels, #291 blunderbuss, #293 hold/sweep, #296 /close + /milestone, #298 owners-label, #300 fixed labels) — none drives /assign.

Priority

  • Impact: medium
  • Effort: low

Filed by quality agent (hold-gated mode)


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 3fc21f2

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

Lingua principale
TypeScript
Stelle
132
Fork
23
Merge medio
1g 2h
PR unite (30g)
98

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cncf/prow-github-actions

Tutte le issue di cncf/prow-github-actions

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.