Skip to content

Commit

Permalink
change in down- and upvotes
Browse files Browse the repository at this point in the history
  • Loading branch information
TunahanGuler committed Jan 21, 2025
1 parent aab56ad commit e558654
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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])

0 comments on commit e558654

Please sign in to comment.