`/leaderboard`, the page and the share image say "be the first" for a program that hasn't started
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 84/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- backend
Línea de trabajo
Empieza en src/messages.ts en leaderboardMessage (línea 136) y el texto de tablero vacío (líneas 167-173): el mensaje necesita un flag de iniciado/no iniciado pasado de la forma en que hoy se pasa final. src/page.ts ya construye statusLine y src/card.ts construye boardState, así que propaga ese estado a ambos, y en src/commands.ts (caso leaderboard, línea 80) omite la búsqueda de GitHub cuando el programa no ha empezado. Escribe primero tests que fallen en test/messages.test.ts, test/card.test.ts y test/page.test.ts; terminado es que las tres superficies digan la fecha de inicio y que npm test y npm run typecheck pasen.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 0
- Forks
- 1
- Merge medio
- 2 h 38 min
- PR fusionados (30 d)
- 73
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de codercops/discord-bot
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
codercops/discord-bot#108 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Keep the slash command list in one module, and test that `/help` and the registered commands matchAbiertohelp wanted testing
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
codercops/discord-bot#154 ·
Los mantenedores suelen responder en 1 día
-
enhancement help wanted
Dificultad 3/5 1-2 días Aptitud para principiantes 74/100
codercops/discord-bot#153 ·
Los mantenedores suelen responder en 1 día
-
Contributing to discord-bot: start hereQuizá libre de nuevo @sank8-2 la tomó hace 21 días y no hay ningún pull request abierto. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 15/100
codercops/discord-bot#15 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de codercops/discord-bot
Issues similares
-
Out of order / duplicate key error shows the key bytes as decimal or UTF-8, not hexPosiblemente ocupada @bardrop la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
-
bug i18n
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
endora-commerce/endora-commerce#1315 ·
Los mantenedores suelen responder en 1 día
-
Two stored artist rows are not act names: "DJS" from a Renate floor heading and "Stevie Cox -"Abiertoarea:data-quality importer size:S
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
enorm-labs/event-junkie#5136 ·
Los mantenedores suelen responder en 1 día
-
fix(scripts): set-device-owner.ps1 fails to parse on Windows PowerShell 5.1 (UTF-8 without BOM)Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
WenyuChiou/agent-board#1518 ·
Los mantenedores suelen responder en 1 día