mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 04:40:38 +08:00
adding config value for old Bitbucket Server diff functionality
This commit is contained in:
@ -156,8 +156,10 @@ class BitbucketServerProvider(GitProvider):
|
|||||||
guaranteed_common_ancestor = source_commits_list[-1]['parents'][0]['id']
|
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']))
|
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']
|
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 = []
|
diff_files = []
|
||||||
original_file_content_str = ""
|
original_file_content_str = ""
|
||||||
|
@ -263,6 +263,7 @@ pr_commands = [
|
|||||||
"/review --pr_reviewer.num_code_suggestions=0",
|
"/review --pr_reviewer.num_code_suggestions=0",
|
||||||
"/improve --pr_code_suggestions.commitable_code_suggestions=true --pr_code_suggestions.suggestions_score_threshold=7",
|
"/improve --pr_code_suggestions.commitable_code_suggestions=true --pr_code_suggestions.suggestions_score_threshold=7",
|
||||||
]
|
]
|
||||||
|
legacy_diff_calculation = false
|
||||||
|
|
||||||
[litellm]
|
[litellm]
|
||||||
# use_client = false
|
# use_client = false
|
||||||
|
Reference in New Issue
Block a user