Skip to content

Conversation

@WarningImHack3r
Copy link
Owner

@WarningImHack3r WarningImHack3r commented Nov 21, 2025

For some obscure reason, with Vercel/prod deployments, the GH URL you prefix SC's domain with throws a 404, where in dev or preview builds it works fine.

Turns out, as we could see in the URL with this 404 page, the // of the URL scheme gets dedup'd on prod builds.
The fix is simply to match one or two slashes, that's it.

(Had to make a PR to try it out with prod builds)

Summary by CodeRabbit

  • Bug Fixes
    • Improved URL parsing robustness to handle GitHub-related URLs with varying slash patterns more consistently.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Nov 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
svelte-changelog Ready Ready Preview Comment Nov 21, 2025 7:15pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 21, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Modified the URL-prefix stripping regex in src/params/gh.ts by changing the pattern from ^https?:\/\/ to ^https?:\/\/? to make the trailing slash optional, allowing the regex to tolerate an additional leading slash in URLs.

Changes

Cohort / File(s) Summary
URL-prefix regex refinement
src/params/gh.ts
Updated regex pattern to optionally match an extra slash; changed ^https?:\/\/ to ^https?:\/\/?

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single-character regex modification with minimal scope and logic density
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-scheme-gh-link

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between caee78b and 9d51db5.

📒 Files selected for processing (1)
  • src/params/gh.ts (1 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@WarningImHack3r WarningImHack3r marked this pull request as ready for review November 21, 2025 19:23
@WarningImHack3r WarningImHack3r merged commit 6af9868 into main Nov 21, 2025
4 of 5 checks passed
@WarningImHack3r WarningImHack3r deleted the fix-scheme-gh-link branch November 21, 2025 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants