code-review-ai-cli 2.2.1__tar.gz → 2.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/PKG-INFO +1 -1
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/code_review_ai_cli.egg-info/PKG-INFO +1 -1
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/pyproject.toml +1 -1
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/src/tfs_client.py +2 -3
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/tests/test_tfs_client.py +11 -11
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/README.md +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/code_review_ai_cli.egg-info/SOURCES.txt +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/code_review_ai_cli.egg-info/dependency_links.txt +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/code_review_ai_cli.egg-info/entry_points.txt +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/code_review_ai_cli.egg-info/requires.txt +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/code_review_ai_cli.egg-info/top_level.txt +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/setup.cfg +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/src/__init__.py +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/src/ai_review.py +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/src/config.py +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/src/context_extractor.py +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/src/formatter.py +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/src/git_utils.py +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/src/llm_client.py +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/src/prompt_utils.py +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/src/prompts/config.yaml.template +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/src/prompts/review_prompt.md.template +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/tests/test_ai_review.py +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/tests/test_config.py +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/tests/test_context_extractor.py +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/tests/test_formatter.py +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/tests/test_git_utils.py +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/tests/test_llm_client.py +0 -0
- {code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/tests/test_prompt_utils.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "code-review-ai-cli"
|
|
7
|
-
version = "2.2.
|
|
7
|
+
version = "2.2.2"
|
|
8
8
|
description = "Automated AI-powered code review CLI for Azure DevOps / TFS Pull Requests"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -342,8 +342,7 @@ class TFSClient:
|
|
|
342
342
|
Diff as text, ready to be passed to the LLM client.
|
|
343
343
|
|
|
344
344
|
Raises:
|
|
345
|
-
TFSError: If the PR has no iterations
|
|
346
|
-
after filtering.
|
|
345
|
+
TFSError: If the PR has no iterations.
|
|
347
346
|
"""
|
|
348
347
|
# Get PR details
|
|
349
348
|
path = f"git/repositories/{repository}/pullrequests/{pr_id}"
|
|
@@ -436,7 +435,7 @@ class TFSClient:
|
|
|
436
435
|
diff_parts.append("")
|
|
437
436
|
|
|
438
437
|
if not diff_parts:
|
|
439
|
-
|
|
438
|
+
return ""
|
|
440
439
|
|
|
441
440
|
return "\n".join(diff_parts)
|
|
442
441
|
|
|
@@ -326,8 +326,8 @@ def test_get_pull_request_diff_raises_for_missing_iterations_or_changes(mocker)
|
|
|
326
326
|
{"changeEntries": []},
|
|
327
327
|
],
|
|
328
328
|
)
|
|
329
|
-
|
|
330
|
-
|
|
329
|
+
result = client.get_pull_request_diff("repo-a", 1)
|
|
330
|
+
assert result == ""
|
|
331
331
|
|
|
332
332
|
|
|
333
333
|
def test_get_pull_request_diff_filters_excluded_paths(mocker) -> None:
|
|
@@ -392,8 +392,8 @@ def test_get_pull_request_diff_filters_extensions(mocker) -> None:
|
|
|
392
392
|
)
|
|
393
393
|
|
|
394
394
|
|
|
395
|
-
def
|
|
396
|
-
"""It should
|
|
395
|
+
def test_get_pull_request_diff_returns_empty_if_all_filtered(mocker) -> None:
|
|
396
|
+
"""It should return an empty string (not raise) if all files are filtered out."""
|
|
397
397
|
client = TFSClient(make_tfs_config())
|
|
398
398
|
mocker.patch(
|
|
399
399
|
"src.tfs_client.TFSClient._get",
|
|
@@ -407,9 +407,9 @@ def test_get_pull_request_diff_raises_if_all_filtered(mocker) -> None:
|
|
|
407
407
|
)
|
|
408
408
|
mocker.patch("src.tfs_client.TFSClient._build_unified_diff_part", return_value=["UNIFIED"])
|
|
409
409
|
|
|
410
|
-
# Exclude IoT. All files are filtered
|
|
411
|
-
|
|
412
|
-
|
|
410
|
+
# Exclude IoT. All files are filtered — returns empty string instead of raising.
|
|
411
|
+
result = client.get_pull_request_diff("repo-a", 1, excluded_paths=["IoT"])
|
|
412
|
+
assert result == ""
|
|
413
413
|
|
|
414
414
|
|
|
415
415
|
def test_get_pr_changed_files_handles_null_item(mocker) -> None:
|
|
@@ -501,8 +501,8 @@ def test_get_pull_request_diff_handles_null_item_in_non_delete(mocker) -> None:
|
|
|
501
501
|
assert "UNIFIED" in result
|
|
502
502
|
|
|
503
503
|
|
|
504
|
-
def
|
|
505
|
-
"""It should raise
|
|
504
|
+
def test_get_pull_request_diff_returns_empty_when_only_deletes_present(mocker) -> None:
|
|
505
|
+
"""It should return an empty string (not raise) when the PR contains only deleted files."""
|
|
506
506
|
client = TFSClient(make_tfs_config())
|
|
507
507
|
mocker.patch(
|
|
508
508
|
"src.tfs_client.TFSClient._get",
|
|
@@ -516,8 +516,8 @@ def test_get_pull_request_diff_raises_when_only_deletes_present(mocker) -> None:
|
|
|
516
516
|
],
|
|
517
517
|
)
|
|
518
518
|
|
|
519
|
-
|
|
520
|
-
|
|
519
|
+
result = client.get_pull_request_diff("repo-a", 1)
|
|
520
|
+
assert result == ""
|
|
521
521
|
|
|
522
522
|
|
|
523
523
|
def test_build_diff_parts_and_file_content(mocker) -> None:
|
|
File without changes
|
{code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/code_review_ai_cli.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/code_review_ai_cli.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/code_review_ai_cli.egg-info/requires.txt
RENAMED
|
File without changes
|
{code_review_ai_cli-2.2.1 → code_review_ai_cli-2.2.2}/code_review_ai_cli.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|