mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 21:30:40 +08:00
Refactor Azure DevOps provider to use PR iterations for change detection, improving accuracy of diff file identification
This commit is contained in:
@ -253,9 +253,11 @@ class AzureDevopsProvider(GitProvider):
|
|||||||
diff_types = {}
|
diff_types = {}
|
||||||
if changes:
|
if changes:
|
||||||
for change in changes.change_entries:
|
for change in changes.change_entries:
|
||||||
c = change.additional_properties['item']
|
item = change.additional_properties.get('item', {})
|
||||||
diffs.append(c['path'])
|
path = item.get('path', None)
|
||||||
diff_types[c['path']] = change.additional_properties['changeType']
|
if path:
|
||||||
|
diffs.append(path)
|
||||||
|
diff_types[path] = change.additional_properties.get('changeType', 'Unknown')
|
||||||
|
|
||||||
# wrong implementation - gets all the files that were changed in any commit in the PR
|
# wrong implementation - gets all the files that were changed in any commit in the PR
|
||||||
# commits = self.azure_devops_client.get_pull_request_commits(
|
# commits = self.azure_devops_client.get_pull_request_commits(
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
model="gpt-4-turbo-2024-04-09"
|
model="gpt-4-turbo-2024-04-09"
|
||||||
model_turbo="gpt-4-turbo-2024-04-09"
|
model_turbo="gpt-4-turbo-2024-04-09"
|
||||||
fallback_models=["gpt-4-0125-preview"]
|
fallback_models=["gpt-4-0125-preview"]
|
||||||
git_provider="azure"
|
git_provider="github"
|
||||||
publish_output=false
|
publish_output=true
|
||||||
publish_output_progress=true
|
publish_output_progress=true
|
||||||
verbosity_level=2 # 0,1,2
|
verbosity_level=0 # 0,1,2
|
||||||
use_extra_bad_extensions=false
|
use_extra_bad_extensions=false
|
||||||
use_wiki_settings_file=true
|
use_wiki_settings_file=true
|
||||||
use_repo_settings_file=true
|
use_repo_settings_file=true
|
||||||
@ -80,7 +80,7 @@ enable_help_text=false
|
|||||||
[pr_code_suggestions] # /improve #
|
[pr_code_suggestions] # /improve #
|
||||||
max_context_tokens=8000
|
max_context_tokens=8000
|
||||||
num_code_suggestions=4
|
num_code_suggestions=4
|
||||||
commitable_code_suggestions = true
|
commitable_code_suggestions = false
|
||||||
extra_instructions = ""
|
extra_instructions = ""
|
||||||
rank_suggestions = false
|
rank_suggestions = false
|
||||||
enable_help_text=false
|
enable_help_text=false
|
||||||
|
Reference in New Issue
Block a user