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

[quality] removeFixedLabels' no-op and failed-labels-read arms are never driven through dist/index.js

Aperta
#299 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.

  • #300 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-actions, typescript
Ambito
testing

Direzione di ricerca

Start with src/labels/fixed.ts and the existing bundle tests under __tests__/bundle/; the issue names __tests__/bundle/fixedLabelArms.test.ts as the proposed test file. Run npm run test:coverage:e2e to check the shipped bundle behavior. Done means the no-label case exits successfully without a DELETE or POST, and the failed GET case exits with an error naming could not get labels from issue and no DELETE.

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

Descrizione

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

Finding

src/labels/fixed.ts removeFixedLabels (the /remove-help and /remove-good-first-issue forms) has two arms that the end-to-end bundle suite never reaches:

  • lines 54–56: a failed getCurrentLabels read is wrapped and rethrown as could not get labels from issue: …
  • lines 58–60: none of the command's labels are on the issue → debug log and return without any DELETE

Unit evidence: npx vitest run --coverage on main @ 3fc21f2 (vitest 5.0.3, @vitest/coverage-v8): src/labels/fixed.ts 100 % lines / 100 % branches (__tests__/label/help.test.ts covers both arms with mocked octokit).

End-to-end evidence: npm run test:coverage:e2e on main @ 3fc21f2 (local run, 5 files / 142 tests, source-mapped bundle from __tests__/bundle/coverageEntry): src/labels/fixed.ts 33.33 % lines (7/21) / 25 % branches; uncovered lines 43–63 and 70, i.e. all of removeFixedLabels. The whole src/ tree sits at 77.9 % lines e2e.

Held PR #246 drives the happy path of /remove-help (lines 43–53, 63). The two arms above are disjoint from it: nothing open exercises a 5xx on GET /issues/1 or a /remove- form with none of its labels present through the shipped bundle.

Recommendation

  • add __tests__/bundle/fixedLabelArms.test.ts driving /remove-good-first-issue with none of its labels on the issue (exit 0, one GET /issues/1, no DELETE/POST) and /remove-help with GET /issues/1 → 500 (exit 1, error names could not get labels from issue, no DELETE)

Expected after the fix (measured): fixed.ts e2e 19/21 lines (90.5 %); line 63 is left to #246 and line 70 (requireIssueNumber throw) is unreachable from an issue_comment payload.

Priority

  • Impact: medium — covered by unit tests, not by the e2e suite (priority 2 per the coverage evidence rules)
  • 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
123
Fork
24
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.