`/leaderboard`, the page and the share image say "be the first" for a program that hasn't started
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 84/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- backend
Direzione di ricerca
Inizia in src/messages.ts a leaderboardMessage (riga 136) e nel testo della board vuota (righe 167-173): il messaggio richiede un flag avviato/non avviato passato nel modo in cui oggi viene passato final. src/page.ts costruisce già statusLine e src/card.ts costruisce boardState, quindi porta quello stato in entrambi, e in src/commands.ts (caso leaderboard, riga 80) salta la ricerca GitHub quando il programma non è stato avviato. Scrivi prima test che falliscono in test/messages.test.ts, test/card.test.ts e test/page.test.ts; fatto significa che tutte e tre le superfici riportano la data di inizio e che npm test e npm run typecheck passano.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Pick CODERCOPS December 2026 in /leaderboard and the reply says:
No merged PRs counted yet. Pick a starter issue and be the first.
But a PR merged now counts for November, not December. The program's page and its share image say the same thing, right under their own "Starts Dec 1, 2026" and "STARTS DEC 1" labels. oss.codercops.com/leaderboard/2026-12 shows it today. The text comes from three places:
src/messages.ts, line 172.leaderboardMessageonly knows whether a program has ended (final), not whether it has started.src/page.ts, line 245, the empty board on the pagesrc/card.ts, line 219, the board image at/leaderboard/2026-12.png
The /leaderboard reply also searches GitHub for a date range in the future (getLeaderboard in src/commands.ts, line 83). Nothing can match, and it uses up a request from GitHub's search limit (30 a minute with a token).
What to do
- For a program that hasn't started, say when it starts instead, for example "Starts Dec 1, 2026 (UTC). PRs merged before then don't count for it." in all three places. The page and the card already know the status (
statusLineinsrc/page.ts, line 23, andboardStateinsrc/card.ts, line 130).leaderboardMessageneeds it passed in, the wayfinalis today. - In the
leaderboardcommand, don't search GitHub for a program that hasn't started. An empty board is enough.
Where to look
src/messages.ts:leaderboardMessage(line 136) and the empty board text (lines 167 to 173)src/page.ts:statusLine(line 23) and line 245src/card.ts:boardState(line 130) and lines 217 to 219src/commands.ts: theleaderboardcase (line 80)test/messages.test.ts: the empty board tests (lines 277 and 286);test/card.test.ts: the empty state test (line 160);test/page.test.ts:statusLine(line 51)
Acceptance criteria
- For a program that hasn't started, the reply, the page and the image say when it starts and don't say "be the first"
- Running and ended programs read the same as now
-
/leaderboardfor a program that hasn't started makes no GitHub search request - Tests that fail on the current code
-
npm run typecheckandnpm testpass
How to test
The tests already have an upcoming program to copy (test/card.test.ts, line 372, uses one starting in 2100). For the command, run runCommand with the program option set to an upcoming one and check with mockFetch that no /search/issues call was made. By hand: npm run dev, then open http://localhost:8787/leaderboard/2026-12 and http://localhost:8787/leaderboard/2026-12.png. Both work without any secrets.
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off develop, and open your PR against develop with Closes #152 in the description.
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 1
- Merge medio
- 2h 38m
- PR unite (30g)
- 73
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di codercops/discord-bot
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
codercops/discord-bot#108 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Keep the slash command list in one module, and test that `/help` and the registered commands matchApertahelp wanted testing
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
codercops/discord-bot#154 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement help wanted
Difficoltà 3/5 1-2 giorni Idoneità per principianti 74/100
codercops/discord-bot#153 ·
I maintainer di solito rispondono entro 1 giorno
-
Contributing to discord-bot: start hereForse di nuovo libera @sank8-2 l’ha presa 21 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 15/100
codercops/discord-bot#15 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di codercops/discord-bot
Issue simili
-
Out of order / duplicate key error shows the key bytes as decimal or UTF-8, not hexForse già presa @bardrop l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
-
bug i18n
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
endora-commerce/endora-commerce#1315 ·
I maintainer di solito rispondono entro 1 giorno
-
Two stored artist rows are not act names: "DJS" from a Renate floor heading and "Stevie Cox -"Apertaarea:data-quality importer size:S
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
enorm-labs/event-junkie#5136 ·
I maintainer di solito rispondono entro 1 giorno
-
fix(scripts): set-device-owner.ps1 fails to parse on Windows PowerShell 5.1 (UTF-8 without BOM)Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
WenyuChiou/agent-board#1518 ·
I maintainer di solito rispondono entro 1 giorno