`/leaderboard`, the page and the share image say "be the first" for a program that hasn't started
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 84/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
Bắt đầu trong src/messages.ts tại leaderboardMessage (dòng 136) và văn bản bảng trống (dòng 167-173): thông điệp cần một cờ started/not-started được truyền theo cách final đang được truyền hôm nay. src/page.ts đã dựng statusLine và src/card.ts dựng boardState, nên luồn trạng thái đó vào cả hai, và trong src/commands.ts (nhánh leaderboard, dòng 80) bỏ qua tìm kiếm GitHub khi chương trình chưa bắt đầu. Viết test fail trước trong test/messages.test.ts, test/card.test.ts và test/page.test.ts; hoàn thành là khi cả ba bề mặt hiển thị ngày bắt đầu và npm test cùng npm run typecheck đều pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 0
- Fork
- 1
- Merge trung bình
- 2 giờ 38 phút
- Pull request đã merge (30 ngày)
- 73
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của codercops/discord-bot
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
codercops/discord-bot#108 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Keep the slash command list in one module, and test that `/help` and the registered commands matchĐang mởhelp wanted testing
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
codercops/discord-bot#154 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
codercops/discord-bot#153 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Contributing to discord-bot: start hereCó thể làm lại được @sank8-2 đã nhận 21 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 15/100
codercops/discord-bot#15 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của codercops/discord-bot
Issue tương tự
-
Out of order / duplicate key error shows the key bytes as decimal or UTF-8, not hexCó thể đã có người làm @bardrop đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
-
bug i18n
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
endora-commerce/endora-commerce#1315 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Two stored artist rows are not act names: "DJS" from a Renate floor heading and "Stevie Cox -"Đang mởarea:data-quality importer size:S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
enorm-labs/event-junkie#5136 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(scripts): set-device-owner.ps1 fails to parse on Windows PowerShell 5.1 (UTF-8 without BOM)Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
WenyuChiou/agent-board#1518 ·
Maintainer thường phản hồi trong vòng 1 ngày