Announce a contributor program in #leaderboard when it starts
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 74/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- nodejs, typescript
- Lĩnh vực
- backend
Hướng nghiên cứu
Start in src/index.ts at dailyPosts (line 463) and read the final-results path (lines 487-511) to copy its started:<id> KV mark, retry-on-failure and one-week window. Add programStartMessage(program, { url }) to src/messages.ts beside leaderboardMessage (line 136), reusing dateRange from src/page.ts (line 17). Drive it with the scheduled tests in test/index.test.ts (line 262), calling worker.scheduled at 2026-12-01T04:30:00Z and 2026-12-02T04:30:00Z and asserting on fetched.discord(); done is all acceptance boxes checked and npm run typecheck plus npm test green.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
There's a new program every month now, but nothing in Discord says when one starts. The daily run (dailyPosts, src/index.ts, line 463) posts a running program's board on Mondays (line 478) and its final results once it ends (line 487). December starts on a Tuesday, so the first time #leaderboard mentions it will be the weekly board on December 7.
A short post on the first run after a program starts would tell people the new month is on, right after the old month's final results, while they're paying attention.
What to do
- Add a message builder to
src/messages.ts, for exampleprogramStartMessage(program, { url }), with no I/O like the others. It should give the title, the dates (dateRangeinsrc/page.ts, line 17, already writes "Dec 1 to Dec 31, 2026 (UTC)"), what counts (the label and the repos), the minimum, how many people win what, the note if there is one, a link to the program page, and a pointer to/issues. It must not ping anyone. - In
dailyPosts, send it toCHANNEL_LEADERBOARDonce per program, on the first run afterstart. Copy how the final results do it (lines 487 to 511): astarted:<id>mark in KV so it goes out once, another try on the next run if sending fails, and only within a week of the start, so adding an older program to the config doesn't announce it. - When a program starts on a Monday, send the start post instead of that day's weekly board, which would be empty anyway.
- Mention it in the daily cron row of the "How it works" table in README.md.
Where to look
src/index.ts:dailyPosts(line 463)src/messages.ts:leaderboardMessage(line 136), for how the footer and the page link are writtentest/index.test.ts: the "scheduled leaderboard" tests (line 262)
Acceptance criteria
- On the first daily run in a program's first week, one start post goes to the leaderboard channel, and none on later runs
- If sending fails, it's tried again on the next run
- A program whose start was more than a week ago is never announced
- A program that starts on a Monday gets the start post and no weekly board that day
- On December 1 the order is November's final results, then December's start post
- Tests for these cases
-
npm run typecheckandnpm testpass
How to test
The scheduled tests call worker.scheduled at a given time, so you can run, for example, 2026-12-01T04:30:00Z and 2026-12-02T04:30:00Z with a November and a December program and check what fetched.discord() holds after each. Some existing tests run inside a program's first week and will now see the extra post: "handles several programs, each on its own" (line 345) runs on November 2 with a November program. Update their expectations, or set the started: mark in KV where a test isn't about the start post.
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 #153 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
-
`/leaderboard`, the page and the share image say "be the first" for a program that hasn't startedĐang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
codercops/discord-bot#152 ·
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 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
-
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