-
Notifications
You must be signed in to change notification settings - Fork 5.4k
fix(confluence): handle relative paths when extracting cursor from link #17910
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
base: master
Are you sure you want to change the base?
fix(confluence): handle relative paths when extracting cursor from link #17910
Conversation
@childish-sambino is attempting to deploy a commit to the Pipedreamers Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
WalkthroughThe private method Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ 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. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
components/confluence/confluence.app.mjs (1)
149-157
: Case-insensitivehttp(s)
detection would be safer
link.startsWith("http")
assumes the scheme is lowercase and explicitly begins with “http”.
Using a simple case-insensitive regexp avoids surprising failures with inputs likeHTTPS://…
.- if (link.startsWith("http")) { + if (/^https?:\/\//i.test(link)) {Purely optional, but it makes the helper a bit more robust without affecting behaviour.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/confluence/confluence.app.mjs
(1 hunks)
🔇 Additional comments (1)
components/confluence/confluence.app.mjs (1)
149-157
: Nice defensive fallback for relative URLsGood call supplying a base URL so the
URL
constructor can still parse query parameters. The change cleanly prevents theERR_INVALID_URL
thrown for relative paths.
WHY
Seeing errors like this:
API reference: https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space/#api-group-space
Summary by CodeRabbit