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

laddr-import: tick the slug-reachability validation criterion now that read-api has landed

Aperta
#27 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
74/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
typescript

Direzione di ricerca

Inizia da apps/api/scripts/fixtures/laddr-fixture.sql, dall’importatore, da createTestRepo(), da createTestPrivateStore() e da buildApp() per comprendere la configurazione dei test. Esegui l’importatore, avvia l’app con il repository di test e prova /api/projects/:slug e /api/people/:slug per un massimo di 100 record importati. Il lavoro è completato quando le forme delle risposte documentate sono verificate e la sezione Notes del piano registra che il criterio di raggiungibilità tramite slug è stato chiuso dai test di questa issue.

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

Descrizione

Background

The laddr-import plan (PR #24) left this Validation criterion unchecked:

  • All laddr slugs are accessible via /projects/:slug and /members/:slug after the import (verified via API test on a sample of 100 random records)

…with a Notes line claiming "those routes are owned by read-api and aren't built yet." That's not accurate at the time the PR was opened — read-api (PR #22) merged at 17:50 UTC; laddr-import's PR opened at 22:29 UTC. The /api/projects/:slug and /api/people/:slug endpoints existed.

What to do

Add an end-to-end test that:

  1. Runs the importer against apps/api/scripts/fixtures/laddr-fixture.sql into a createTestRepo() + createTestPrivateStore().
  2. Boots buildApp({ overrideEnv: { CFP_DATA_REPO_PATH: <the test repo path>, ... } }).
  3. Picks 100 random imported records (or all of them if the fixture has fewer); for each, asserts GET /api/projects/<slug> and/or GET /api/people/<slug> returns the documented response shape.
  4. Ticks the validation criterion in the plan.

Note: plans are frozen after merge, so the tick happens in this issue's PR via a small docs amendment under "Notes" rather than rewriting the criterion. Add a line like "Validation criterion 9 (slug reachability) closed out via Issue #N's tests; see [link]."

Why bother

Closes the loop on a real validation gap. The import is one-shot — wrong slug → wrong URL forever. The test costs ~5min to write and pays for itself the first time it catches a slugify mistake.

Lingua principale
TypeScript
Stelle
1
Fork
1
Merge medio
11m
PR unite (30g)
22

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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 CodeForPhilly/codeforphilly-ng

Tutte le issue di CodeForPhilly/codeforphilly-ng

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.