Skip to content

fix: resolve URLs that start with gitingest.com#580

Open
marlandoj wants to merge 1 commit into
coderamp-labs:mainfrom
marlandoj:fix/gitingest-url-prefix
Open

fix: resolve URLs that start with gitingest.com#580
marlandoj wants to merge 1 commit into
coderamp-labs:mainfrom
marlandoj:fix/gitingest-url-prefix

Conversation

@marlandoj
Copy link
Copy Markdown

Summary

  • Users sometimes copy-paste the gitingest.com URL (e.g. https://gitingest.com/github.com/user/repo) back into the input form, which previously raised Unknown domain 'gitingest.com' in URL
  • Added detection in _normalise_source to strip the gitingest.com host and re-parse the remaining path, routing it to the real underlying git host
  • Handles both the scheme form (https://gitingest.com/...) and the scheme-less form (gitingest.com/...)

Changes

  • src/gitingest/utils/query_parser_utils.py: In _normalise_source, detect gitingest.com as host and recurse with the path stripped of the prefix
  • tests/query_parser/test_query_parser.py: Add test_parse_url_gitingest_prefix parametrized over three URL variants

Test plan

  • New test test_parse_url_gitingest_prefix covers https://gitingest.com/github.com/..., gitingest.com/github.com/..., and https://gitingest.com/gitlab.com/...
  • Confirmed tests failed before the fix and pass after
  • Full tests/query_parser/test_query_parser.py suite passes (42/42)

🤖 Generated with Claude Code

Users often copy-paste the gitingest.com URL (e.g.
https://gitingest.com/github.com/user/repo) back into the input form.
Strip the gitingest.com host and re-parse the remaining path so those
URLs resolve to the underlying git host instead of raising an
"Unknown domain" error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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