-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle GitHub URLs starting with "org-".
- Loading branch information
1 parent
d13389b
commit aca4a79
Showing
2 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,6 +202,32 @@ def test_repo_url_with_subdirectory(test_repo: Path, tmp_path: Path) -> None: | |
) | ||
|
||
|
||
def test_ssh_org_repo_url(test_repo: Path, tmp_path: Path) -> None: | ||
"""Test SSH-style repo URL parsing.""" | ||
repo = git.Repo(test_repo) | ||
# Change origin URL to SSH format | ||
repo.delete_remote(repo.remotes.origin) | ||
repo.create_remote( | ||
"origin", "[email protected]:openai/openai-realtime-solar-system.git" | ||
) | ||
|
||
generator = DocGenerator( | ||
input_dir=test_repo, | ||
output_dir=tmp_path / "output", | ||
model_name="", | ||
count_tokens=False, | ||
ignore_patterns=[], | ||
) | ||
|
||
assert ( | ||
generator.repo_url == "https://github.com/openai/openai-realtime-solar-system" | ||
) | ||
assert ( | ||
generator.repo_url_file_prefix | ||
== "https://github.com/openai/openai-realtime-solar-system/blob/main/" | ||
) | ||
|
||
|
||
@pytest.fixture | ||
def mock_model(monkeypatch): | ||
"""Mock LLM model that returns truncated input as response.""" | ||
|