-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Currently, the Almanack relies on Python’s built-in urlparse to parse GitHub SSH links
Lines 329 to 331 in dbefaba
| parsed_url = urlparse(remote_url) | |
| if parsed_url.scheme in {"http", "https", "ssh"} and parsed_url.netloc: | |
| return remote_url |
Below is an example of using the code if a remote link is provided (SHH format)
urlparse does not properly handle SSH-style GitHub URLs (e.g., git@github.com:user/repo.git), since these URLs do not include a scheme. As a result, the parsing step fails and the function always returns None when the rest of the code expects a valid scheme to extract the repository URL.
Proposed solution:
Use giturlparse, which may correctly parse both HTTPS and SSH Git URLs. This would ensure consistent parsing across different remote URL formats.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels