Skip to content

Fix: owner/repo shorthand rejected when input has a trailing slash - #104

Open
nakulsharma97 wants to merge 1 commit into
braedonsaunders:mainfrom
nakulsharma97:fix/parseurl-trailing-slash
Open

Fix: owner/repo shorthand rejected when input has a trailing slash#104
nakulsharma97 wants to merge 1 commit into
braedonsaunders:mainfrom
nakulsharma97:fix/parseurl-trailing-slash

Conversation

@nakulsharma97

Copy link
Copy Markdown

No description provided.

@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

@nakulsharma97 is attempting to deploy a commit to the braedonsaunders' projects Team on Vercel.

A member of the Team first needs to authorize it.

@braedonsaunders

Copy link
Copy Markdown
Owner

Thanks. The trailing-slash parseUrl fix looks good, and the new tests help.

This PR also brings Windows CLI watcher changes, analysis.js tweaks, pattern filtering, and a .freebuff/project-id. Can you drop the freebuff file and keep this PR scoped to parseUrl? Happy to look at the Windows bits in a separate PR.

parseUrl() now accepts a trailing slash on both the bare owner/repo
shorthand (e.g. "facebook/react/") and full GitHub URLs
(e.g. https://github.com/facebook/react/).

Added tests covering trailing-slash acceptance, extra-segment rejection,
.git suffix stripping, and garbage input.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@nakulsharma97
nakulsharma97 force-pushed the fix/parseurl-trailing-slash branch from d10836e to dc23570 Compare September 10, 2026 09:27
@nakulsharma97

Copy link
Copy Markdown
Author

Done — scoped the PR to the parseUrl fix only. All unrelated files (CLI watcher, analysis.js tweaks, pattern filtering, .freebuff/project-id) have been dropped.

What changed:

  • index.htmlparseUrl() regex now accepts an optional trailing slash (/?) on both bare owner/repo shorthand and full GitHub URLs
  • tests/parse-url.test.mjs — 6 new tests covering trailing-slash acceptance, extra-segment rejection, .git suffix stripping, and garbage input

The Windows CLI watcher fixes and cross-platform test improvements can go in a separate PR whenever you're ready to review them.

@braedonsaunders

Copy link
Copy Markdown
Owner

Perfect, thanks for scoping it. The parseUrl change and the new tests look good. I approved CI on the latest commit; will merge once Codex and checks are through. Separate PR for the Windows watcher whenever you're ready.

@braedonsaunders braedonsaunders left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Trailing-slash on bare owner/repo is the right fix, and the new parse-url tests cover the cases I care about. CI green on Tests and CodeQL. Holding the merge until Codex can review the latest commit (usage limits right now), then I will merge. Windows CLI watcher still welcome as a separate PR.

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