feat: add Telegram Bot API documentation support#18
feat: add Telegram Bot API documentation support#18bojanstef wants to merge 1 commit intoamantus-ai:mainfrom
Conversation
|
@bojanstef is attempting to deploy a commit to the Amantus Machina Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdded a new Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/utils/__tests__/url-utils.test.ts (1)
169-173: Add a lookalike-domain negative case for regression safety.Consider asserting that similar-but-invalid hosts are rejected (e.g.,
core.telegram.org.evil.com) to guard future changes to exception matching.🧪 Suggested test addition
it('should validate Telegram Bot API', () => { expect(isValidDocumentationUrl('https://core.telegram.org/')).toBe(true); expect(isValidDocumentationUrl('https://core.telegram.org/bots')).toBe(true); expect(isValidDocumentationUrl('https://core.telegram.org/bots/api')).toBe(true); + expect(isValidDocumentationUrl('https://core.telegram.org.evil.com/bots')).toBe(false); });🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/utils/__tests__/url-utils.test.ts` around lines 169 - 173, Add a negative lookalike-domain test to the existing Telegram Bot API spec: update the test that calls isValidDocumentationUrl to also assert that a similar-but-invalid host like 'https://core.telegram.org.evil.com' (or another subdomain-suffix trick) returns false, ensuring isValidDocumentationUrl rejects lookalike domains and preventing regression in the exception-matching logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/utils/__tests__/url-utils.test.ts`:
- Around line 169-173: Add a negative lookalike-domain test to the existing
Telegram Bot API spec: update the test that calls isValidDocumentationUrl to
also assert that a similar-but-invalid host like
'https://core.telegram.org.evil.com' (or another subdomain-suffix trick) returns
false, ensuring isValidDocumentationUrl rejects lookalike domains and preventing
regression in the exception-matching logic.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (2)
src/constants.tssrc/utils/__tests__/url-utils.test.ts
Add core.telegram.org as an explicit exception in ALLOWED_EXCEPTIONS so that Telegram's developer documentation (bots, API reference, etc.) passes URL validation. Includes test coverage for the new exception.
014f026 to
a0ff01e
Compare
Summary
core.telegram.orgas an explicit exception inALLOWED_EXCEPTIONSso Telegram's developer documentation passes URL validationhttps://core.telegram.org/bots,https://core.telegram.org/bots/api)Test plan
https://core.telegram.org/botspassesisValidDocumentationUrlhttps://core.telegram.org/bots/apipassesisValidDocumentationUrlnpm test— all existing tests continue to pass