-
Notifications
You must be signed in to change notification settings - Fork 10.5k
fix: regex and id extraction for giphy media urls #22276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@abhix4 is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cubic reviewed 1 file and found no issues. Review PR in cubic.dev.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cubic reviewed 1 file and found no issues. Review PR in cubic.dev.
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (07/04/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (07/04/25)1 label was added to this PR based on Keith Williams's automation. |
if (!matches || matches.length < 2) { | ||
return res.status(400).json({ message: "Giphy URL is invalid" }); | ||
} | ||
const giphyId = matches[2]; | ||
const giphyId = matches[1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain this change?
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe changes update the regular expression used in the Giphy URL validation logic within Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes were found. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
This PR is being marked as stale due to inactivity. |
Making it draft. Feel free to rfr once the comments are addressed. |
@coderabbitai review |
✅ Actions performedReview triggered.
|
Pull request was closed
E2E results are ready! |
What does this PR do?
Fixed the regular expression used for validation.
Correctly extracts the Giphy ID from the URL path.
Visual Demo (For contributors especially)
before:

after:

Mandatory Tasks (DO NOT REMOVE)
Summary by cubic
Fixed Giphy URL validation and ID extraction to correctly handle different Giphy media URL formats.