`/leaderboard`, the page and the share image say "be the first" for a program that hasn't started
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 84/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- backend
调研方向
从 src/messages.ts 中的 leaderboardMessage(第 136 行)和空榜文案(第 167-173 行)开始:消息需要按今天传入 final 的方式传入一个 started/not-started 标志。src/page.ts 已经构建 statusLine,src/card.ts 构建 boardState,所以把这个状态贯穿到两者中,并且在 src/commands.ts(leaderboard 分支,第 80 行)中,当程序尚未开始时跳过 GitHub 搜索。先在 test/messages.test.ts、test/card.test.ts 和 test/page.test.ts 中写会失败的测试;完成标准是三个界面都显示开始日期,并且 npm test 和 npm run typecheck 通过。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 1
- 平均合并
- 2 小时 38 分钟
- 30 天内合并 PR
- 73
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codercops/discord-bot 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
codercops/discord-bot#108 · 1 条评论 ·
维护者通常 1 天内回复
-
Keep the slash command list in one module, and test that `/help` and the registered commands match未关闭help wanted testing
难度 3/5 1-2 天 新手友好度 78/100
codercops/discord-bot#154 ·
维护者通常 1 天内回复
-
enhancement help wanted
难度 3/5 1-2 天 新手友好度 74/100
codercops/discord-bot#153 ·
维护者通常 1 天内回复
-
Contributing to discord-bot: start here可能重新可做 @sank8-2 于 21 天前认领,目前没有进行中的 PR。 未关闭
难度 1/5 1 小时以内 新手友好度 15/100
codercops/discord-bot#15 · 4 条评论 ·
维护者通常 1 天内回复
查看 codercops/discord-bot 的全部 Issue
相似的 Issue
-
Out of order / duplicate key error shows the key bytes as decimal or UTF-8, not hex可能已有人在做 @bardrop 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 86/100
-
bug i18n
难度 2/5 1-3 小时 新手友好度 74/100
endora-commerce/endora-commerce#1315 ·
维护者通常 1 天内回复
-
area:data-quality importer size:S
难度 2/5 1-3 小时 新手友好度 72/100
enorm-labs/event-junkie#5136 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
WenyuChiou/agent-board#1518 ·
维护者通常 1 天内回复