Skip to content

Strip only a trailing .git from GitHub repository names - #93

Open
breken (breken-ai) wants to merge 1 commit into
synthetic-sciences:masterfrom
breken-ai:fix/github-url-name
Open

breken (breken-ai) wants to merge 1 commit into
synthetic-sciences:masterfrom
breken-ai:fix/github-url-name

Conversation

@breken-ai

Copy link
Copy Markdown

GitClient.parse_github_url removed .git wherever it appeared in the repository name, not only as a suffix. A name that contains .git came out mangled, so the clone asked GitHub for a repository that does not exist:

https://github.com/octocat/octocat.github.io  ->  octocat/octocathub.io
https://github.com/octocat/.github            ->  octocat/hub

That covers every GitHub Pages site (<user>.github.io) and every .github profile repository. Both IndexingService.index_repository and the indexing worker parse the pasted URL through this method, so indexing any of them by URL failed at the clone step. The owner/repo shorthand was not affected, because it never goes through the replace.

The fix is removesuffix(".git"), so https://github.com/octocat/octocat.github.io.git still normalises to the same URL as the form without the suffix.

test_parse_github_url_strips_only_a_trailing_git_suffix in backend/tests/test_git_client.py fails on master (octocathub.io) and passes with the change. test_git_client.py and test_indexing_worker.py pass, and ruff and mypy are clean.

🤖 Generated with Claude Code

parse_github_url removed ".git" wherever it appeared in the name, so
https://github.com/octocat/octocat.github.io became octocat/octocathub.io
and the clone failed. Any repository whose name contains .git (GitHub Pages
sites, .github profile repositories) could not be indexed by URL.
@vercel

vercel Bot commented Sep 26, 2026

Copy link
Copy Markdown

breken (@breken-ai) is attempting to deploy a commit to the InkVell Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

1 participant