diff --git a/pr_agent/algo/git_patch_processing.py b/pr_agent/algo/git_patch_processing.py index 92cf2466..2978ac4a 100644 --- a/pr_agent/algo/git_patch_processing.py +++ b/pr_agent/algo/git_patch_processing.py @@ -116,7 +116,7 @@ def omit_deletion_hunks(patch_lines) -> str: def handle_patch_deletions(patch: str, original_file_content_str: str, - new_file_content_str: str, file_name: str, edit_type: EDIT_TYPE) -> str: + new_file_content_str: str, file_name: str, edit_type: EDIT_TYPE = EDIT_TYPE.MODIFIED) -> str: """ Handle entire file or deletion patches. diff --git a/pr_agent/algo/pr_processing.py b/pr_agent/algo/pr_processing.py index 49c4ee73..41c6ec74 100644 --- a/pr_agent/algo/pr_processing.py +++ b/pr_agent/algo/pr_processing.py @@ -408,7 +408,7 @@ def get_pr_multi_diffs(git_provider: GitProvider, continue # Remove delete-only hunks - patch = handle_patch_deletions(patch, original_file_content_str, new_file_content_str, file.filename) + patch = handle_patch_deletions(patch, original_file_content_str, new_file_content_str, file.filename, file.edit_type) if patch is None: continue