mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-13 09:10:38 +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 = {}
|
||||
if changes:
|
||||
for change in changes.change_entries:
|
||||
c = change.additional_properties['item']
|
||||
diffs.append(c['path'])
|
||||
diff_types[c['path']] = change.additional_properties['changeType']
|
||||
item = change.additional_properties.get('item', {})
|
||||
path = item.get('path', None)
|
||||
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
|
||||
# commits = self.azure_devops_client.get_pull_request_commits(
|
||||
|
Reference in New Issue
Block a user