feat(git): add support for git SSH URLs#375
Conversation
- Add support for git@, ssh://, and git:// URLs in resource processing - Enhance error messages for common git failures - Validate git SSH URI format - Update help text and documentation for new URL formats - Add fallback to Python CLI when binary is not found
Clean up code by removing trailing whitespace and improving list comprehension formatting for better readability
- Add git command to error message for better debugging - Rename is_code_hosting_url to is_code_repository_root_url for clarity - Simplify parse_code_hosting_url to handle only org/repo format - Add new stricter is_code_repository_root_url function - Add comprehensive tests for URL parsing and validation
Refactor test assertions and module path declarations to use multiple lines for better readability while maintaining the same test functionality
|
Hi @myysy, I've opened an alternative PR #385 that addresses the same issue (#317) while incorporating @qin-ctx's review feedback:
Happy to discuss or collaborate on merging efforts! |
…317) (#385) - Add git@ SSH URL parsing to parse_code_hosting_url() - Add git@ support to is_code_hosting_url() (clean, no try/except) - Add validate_git_ssh_uri() for early format validation - Add is_git_repo_url() for strict cloneable-repo detection: * git@/ssh://git:// protocols: always repo if domain matches * https URLs: require exactly /owner/repo path (2 segments) * Prevents regression: /issues/, /pull/, /blob/ etc. are NOT repos - Update media_processor routing to use CodeRepositoryParser for git repos - Update CLI resource handler to recognize git@ URLs - Update CodeRepositoryParser.parse() to handle git@ directly - Enhance _run_git() errors: keep command info, add friendly messages - Add 20 comprehensive tests covering all new functions Fixes #317 Addresses review comments from PR #375 (regression risk, test coverage, error message preservation, SSH/HTTP path consistency) Co-authored-by: r266-tech <r266-tech@users.noreply.github.com>
|
oops this pr is duplicated with #385 |
Description
Related Issue
#317
Type of Change
Changes Made
Testing
Checklist
Screenshots (if applicable)
Additional Notes