From c5bc4b44ff24858382fd98754868ac4fc9561128 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Wed, 8 Nov 2023 12:51:30 +0200 Subject: [PATCH] fix added files --- pr_agent/algo/git_patch_processing.py | 2 +- pr_agent/algo/pr_processing.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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