Project
cortex
Description
The cortex pr command incorrectly parses GitHub repository information when the remote URL contains a mixed-case hostname (e.g., GitHub.com instead of github.com).
Because the parsing logic appears to rely on a case-sensitive substring check, valid Git remotes are not recognized correctly. This results in incorrect repository detection and failed API requests.
Error Message
Error: Repository not found (404)
Debug Logs
$ git remote -v
origin https://GitHub.com/user/repo.git (fetch)
origin https://GitHub.com/user/repo.git (push)
$ cortex pr
Fetching pull requests...
Error: Repository not found (404)
System Information
OS: macOS
Cortex CLI version: v0.0.7
Screenshots
https://github.com/springoliver/bounty_challenge_report_image/blob/main/49118.mp4
Steps to Reproduce
- Configure a Git remote using mixed-case host:
git remote set-url origin https://GitHub.com/user/repo.git
- Verify remote:
git remote -v
- Run:
cortex pr
- Observe the result
Expected Behavior
cortex pr should correctly parse GitHub remotes regardless of hostname case
Repository should be detected correctly
Pull request data should be fetched successfully
Actual Behavior
Remote is not parsed correctly
Incorrect repository is inferred or rejected
API request fails with 404
Additional Context
Git remote URLs are case-insensitive for hostnames. CLI tools should normalize hostnames before parsing to ensure consistent behavior.
Project
cortex
Description
The cortex pr command incorrectly parses GitHub repository information when the remote URL contains a mixed-case hostname (e.g., GitHub.com instead of github.com).
Because the parsing logic appears to rely on a case-sensitive substring check, valid Git remotes are not recognized correctly. This results in incorrect repository detection and failed API requests.
Error Message
Debug Logs
System Information
Screenshots
https://github.com/springoliver/bounty_challenge_report_image/blob/main/49118.mp4
Steps to Reproduce
git remote set-url origin https://GitHub.com/user/repo.git
git remote -v
cortex pr
Expected Behavior
cortex pr should correctly parse GitHub remotes regardless of hostname case
Repository should be detected correctly
Pull request data should be fetched successfully
Actual Behavior
Remote is not parsed correctly
Incorrect repository is inferred or rejected
API request fails with 404
Additional Context
Git remote URLs are case-insensitive for hostnames. CLI tools should normalize hostnames before parsing to ensure consistent behavior.