mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-13 03:15:17 +00:00
Add handling for empty diffs in Bitbucket provider to avoid logging errors
This commit is contained in:
parent
396d11aa45
commit
5252e1826d
1 changed files with 5 additions and 2 deletions
|
|
@ -172,8 +172,11 @@ class BitbucketProvider(GitProvider):
|
|||
diff_split_lines[5].startswith("@@"))):
|
||||
diff_split[i] = "\n".join(diff_split_lines[4:])
|
||||
else:
|
||||
get_logger().error(f"Error - failed to remove the bitbucket header from diff {i}")
|
||||
break
|
||||
if diffs[i].data.get('lines_added', 0) == 0 and diffs[i].data.get('lines_removed', 0) == 0:
|
||||
diff_split[i] = ""
|
||||
else:
|
||||
get_logger().error(f"Error - failed to remove the bitbucket header from diff {i}")
|
||||
break
|
||||
|
||||
invalid_files_names = []
|
||||
diff_files = []
|
||||
|
|
|
|||
Loading…
Reference in a new issue