Merged PR shoutout misses the count when the program label is added after the merge
Los mantenedores suelen responder en 1 día
@An16og ya está trabajando en esto.
Desde el 21/10/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
Línea de trabajo
Read src/webhook.ts at onPullRequest, then trace mergedPrMessage in src/messages.ts and sendMessage/editMessage in src/discord.ts. Start with the merged pull request tests in test/webhook.test.ts and run them to understand the current event handling. Done means late program labels refresh the board and update the shoutout, while open PRs, unrelated labels, and already-counted shoutouts remain unchanged; the issue also calls for npm run typecheck and npm test to pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
When a PR is merged, the bot posts a shoutout, and when the PR counts for the program it adds "That's their Nth merged PR on the ... leaderboard." plus, once, "With N they now qualify for ..." (src/messages.ts, lines 110 and 114). onPullRequest (src/webhook.ts, line 189) only reacts to the closed event (line 191) and only looks at the labels in that event (line 200). So when hacktoberfest-accepted is added after the merge:
- the shoutout goes out without the count, and without the qualify line on a 5th PR
- the later
labeledevent is ignored, so the cached board isn't refreshed for that PR until the cache runs out (10 minutes,src/leaderboard.ts, line 60)
This isn't rare. The "Accepted label" workflow in each repo (.github/workflows/accepted-label.yml here) exists to add the label after the merge when a maintainer missed it.
What to do
- Handle
labeledfor a PR that's already merged, when the added label is a program's label and the merge falls in that program's window. Count and cache the board the waycloseddoes (lines 204 to 225). - Store the shoutout's message id when it's posted (
sendMessagereturns it; a KV key with an expiry of a few days is enough), and on the late label, edit that message so it gets the count line, and the qualify line if this is the PR that reaches the minimum. If there's no stored id, refresh the board and skip the edit. - Don't count twice: if the shoutout already has the count because the label was there at the merge, a later
labeledevent changes nothing.
Where to look
src/webhook.ts:onPullRequest(line 189)src/messages.ts:mergedPrMessage(line 88)src/discord.ts:sendMessage(line 118) andeditMessage(line 131)test/webhook.test.ts: the merged pull request tests (line 320)
Acceptance criteria
- A merged PR that gets the program label later ends up with the same shoutout text as one that had it at the merge, including the qualify line on the PR that reaches the minimum
- The board is refreshed on that event
- A
labeledevent on an open PR, for another label, or for a PR whose shoutout already has the count changes nothing - Tests for these cases
-
npm run typecheckandnpm testpass
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 #59 in the description.
- Lenguaje dominante
- TypeScript
- Estrellas
- 0
- Forks
- 1
- Merge medio
- 12 h 22 min
- PR fusionados (30 d)
- 36
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
-
Merged PR shoutout: ask people who haven't linked their GitHub to run /linkPosiblemente ocupada @princecherry9905 la tomó hoy. Abiertoenhancement good first issue hacktoberfest
codercops/discord-bot#66 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Leaderboard page: name the people who qualify but haven't linked their GitHub yetPosiblemente ocupada @varun-pahuja la tomó hoy. Abiertoenhancement hacktoberfest help wanted
Dificultad 3/5 1-2 días Aptitud para principiantes 76/100
codercops/discord-bot#55 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Hacktoberfest 2026: start hereAbiertohacktoberfest
Dificultad 1/5 Menos de una hora Aptitud para principiantes 15/100
codercops/discord-bot#15 ·
Los mantenedores suelen responder en 1 día
Todos los issues de codercops/discord-bot
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
paperclipai/paperclip#17151 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
AgoraIO-Extensions/agent-infra#3159 ·
Los mantenedores suelen responder en 1 día
-
blocklist addition
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
MetaMask/eth-phishing-detect#304596 ·
Los mantenedores suelen responder en 1 día
-
friction
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
kentcdodds/kody#4142 ·
-
[Bug] Statistics | Task statistics are always empty on MikroORM with MySQL or SQLitePosiblemente ocupada @NdekoCode la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ever-co/ever-gauzy#11214 ·
Los mantenedores suelen responder en 1 día