diff --git a/components/collector/src/source_collectors/azure_devops/merge_requests.py b/components/collector/src/source_collectors/azure_devops/merge_requests.py index 2c22c63bb0..9d2d7a5a97 100644 --- a/components/collector/src/source_collectors/azure_devops/merge_requests.py +++ b/components/collector/src/source_collectors/azure_devops/merge_requests.py @@ -76,9 +76,9 @@ def _include_entity(self, entity: Entity) -> bool: @staticmethod def _downvotes(merge_request) -> int: """Return the number of downvotes the merge request has.""" - return len([r for r in merge_request.get("reviewers", []) if r.get("vote", 0) < 0]) + return len([r for r in merge_request.get("reviewers", []) if r.get("approved") is False]) @staticmethod def _upvotes(merge_request) -> int: """Return the number of upvotes the merge request has.""" - return len([r for r in merge_request.get("reviewers", []) if r.get("vote", 0) > 0]) + return len([r for r in merge_request.get("reviewers", []) if r.get("approved") is True])