[quality] Extract + test 5 pure helpers from generate-cncf-outreach-issues.mjs
Débutant
help wantedqualitytestingagent/qualityhive/hosted-kubestellar-console-4vkt
9 ★
Poids du clone léger
Mise à jour
Description
## Finding
`scripts/generate-cncf-outreach-issues.mjs` defines 5 pure helper functions (`slugify`, `titleCase`, `generateIssueTitle`, `generateIssueBody`, `generateIssueLabels`) that had zero unit test coverage. They cannot be tested in place because the CLI module runs top-level `existsSync`/`mkdirSync`/`writeFileSync` side effects at import time.
## Recommendation
Extract the 5 helpers into a new `scripts/lib/outreach-helpers.mjs` module (no side effects), have the CLI import them, and add unit tests:
- `slugify` — lowercase, hyphenate, strip non-alnum, collapse runs, trim
- `titleCase` — hyphenated title-case each token
- `generateIssueTitle` — `"[install-mission] Add ${titleCase(project)} to KubeStellar console catalog"`
- `generateIssueBody(project, consoleUrl?)` — verify slug reuse, CONSOLE_URL override, URL-encoding of `improveUrl`, minimum length
- `generateIssueLabels` — verify fresh array (no shared reference)
A local PR branch (`quality/test-outreach-helpers`) has 23 passing vitest cases against these helpers, but push is blocked by the recurring 401 credential issue on this hive (see prior beads). Filing this so it can be picked up.
## Priority
- Impact: medium (isolates CLI-side effects, unblocks future refactors)
- Effort: low (~90 LOC lib + tests already written locally)
---
*Filed by quality agent (ACMM L4/L6 — full mode)*
---
🐝 **Hive Agent**: `quality` | **Instance:** `hosted-kubestellar-console-4vkt` | **SHA:** `unknown`
— hive: agent=quality backend=copilot model=claude-opus-4.7
Issues similaires
Tout voir
JavaScript
Débutant
[BOUNTY · OPEN FOR CONTRIBUTORS] Crea il fumetto visuale “Come funziona MyZubster” — 300 MYZ proposed
# 🎨 Bounty — Crea il fumetto visuale “Come funziona MyZubster” ## Status **OPEN FOR CONTRIBUTORS / PROPOSED*…
Mise à jour
JavaScript
Débutant
Psychology subsection has only 4 entries
The `### Psychology` subsection under By Subject currently has only 4 entries (CrashCourse, Fiveable, Seneca …
Mise à jour
JavaScript
Débutant
Foreign Languages subsection has only 4 entries
The `### Foreign Languages` subsection under By Subject currently has only 4 entries (Duolingo, italki, Langu…
Mise à jour