fix: apply all PR #57 review fixes (Codex, CodeRabbit, codeant-ai) - #58
Conversation
1. escapeMarkdownV2 helper + title escaping in announceGiveaway
- Added escapeMarkdownV2(text) to escape _ * ` [ ] in user-supplied text
- Applied to giveaway.title in announceGiveaway() to prevent Markdown injection
2. Enforce joinSurface on join paths
- DM deep-link (?start=join_gw_<id>): rejects with "can only be joined from
the group chat" when joinSurface === 'group'
- gw_join_<id> inline button: rejects DM users when joinSurface === 'group',
rejects group users when joinSurface === 'dm'
3. Remove duplicate admin_dashboard_action handler
- Removed admin_dashboard_action_v2_noop placeholder stub
- Single handler at line ~3708 is the only registration
4. Giveaway wizard edge case fixes
- awaitingAdminDecision flag prevents double-trigger of admin notification
when timer fires before admin has clicked extend/force-end
- gw_auto_extend clears awaitingAdminDecision before resetting timer so next
fire can re-evaluate
- pinnedMsgId set to null after unpinChatMessage in finalizeGiveaway
- DM broadcast already respects optOutBroadcasts and muted flags (verified)
- joinSurface enforcement covers group-only and DM-only cases end-to-end
5. CI/CD fixes
- ci.yml: Added BOT_TOKEN: ${{ secrets.BOT_TOKEN }} to smoke test step env so
require('./index.js') does not throw when BOT_TOKEN is needed at load time
- deploy.yml: Added BOT_TOKEN to global env block; expanded deploy job
environment from shorthand to name: production form per spec
https://claude.ai/code/session_01X3PxGFF5zzKptQwVkjYzzN
|
CodeAnt AI is reviewing your PR. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughEnvironment variables for BOT_TOKEN are added to CI/CD workflows. The main application introduces Markdown v2 escaping for titles, enforces group/DM join restrictions on giveaways, and adds state guards to prevent duplicate admin prompts during giveaway operations and cleanup logic during finalization. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
|
CodeAnt AI finished reviewing your PR. |
User description
escapeMarkdownV2 helper + title escaping in announceGiveaway
Enforce joinSurface on join paths
Remove duplicate admin_dashboard_action handler
Giveaway wizard edge case fixes
CI/CD fixes
https://claude.ai/code/session_01X3PxGFF5zzKptQwVkjYzzN
CodeAnt-AI Description
Prevent Markdown injection in announcements, enforce where users can join giveaways, and avoid duplicate admin notifications
What Changed
Impact
✅ Clearer giveaway titles (no broken formatting)✅ Fewer wrong-context join attempts✅ Fewer duplicate admin notifications💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by CodeRabbit
New Features
Bug Fixes
Chores