adding config value for old Bitbucket Server diff functionality

This commit is contained in:
mhoecke1
2024-08-26 16:07:21 -04:00
parent a99ebf8953
commit 0442cdcd3d
2 changed files with 4 additions and 1 deletions

View File

@ -156,8 +156,10 @@ class BitbucketServerProvider(GitProvider):
guaranteed_common_ancestor = source_commits_list[-1]['parents'][0]['id']
destination_commits = list(self.bitbucket_client.get_commits(self.workspace_slug, self.repo_slug, guaranteed_common_ancestor, self.pr.toRef['latestCommit']))
base_sha = self.get_best_common_ancestor(source_commits_list, destination_commits, guaranteed_common_ancestor)
base_sha = self.pr.toRef['latestCommit']
head_sha = self.pr.fromRef['latestCommit']
if not get_settings().bitbucket_server.get("legacy_diff_calculation", False):
base_sha = self.get_best_common_ancestor(source_commits_list, destination_commits, guaranteed_common_ancestor)
diff_files = []
original_file_content_str = ""

View File

@ -263,6 +263,7 @@ pr_commands = [
"/review --pr_reviewer.num_code_suggestions=0",
"/improve --pr_code_suggestions.commitable_code_suggestions=true --pr_code_suggestions.suggestions_score_threshold=7",
]
legacy_diff_calculation = false
[litellm]
# use_client = false