Skip to content

Commit

Permalink
Naming fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
cjllanwarne committed Aug 19, 2024
1 parent 09e5a9d commit b6cf3f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ci/ci/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,12 +486,12 @@ async def _update_last_known_github_status(self, gh):
self.target_branch.state_changed = True

@staticmethod
def _overall_review_status_from_latest_reviews_per_login(latest_reviews_per_login):
def _overall_review_status_from_latest_state_by_login(latest_state_by_login):
active_states = [
state for state in latest_reviews_per_login.values() if state in ('APPROVED', 'CHANGES_REQUESTED')
state for state in latest_state_by_login.values() if state in ('APPROVED', 'CHANGES_REQUESTED')
]

if any(state == 'CHANGES_REQUESTED' for state in latest_reviews_per_login.values()):
if any(state == 'CHANGES_REQUESTED' for state in latest_state_by_login.values()):
return 'changes_requested'
elif len(active_states) < 2:
return 'pending'
Expand All @@ -509,7 +509,7 @@ async def _update_github_review_state(self, gh):
if state != 'COMMENTED':
latest_state_by_login[login] = state

review_state = PR._overall_review_status_from_latest_reviews_per_login(latest_state_by_login)
review_state = PR._overall_review_status_from_latest_state_by_login(latest_state_by_login)

if review_state != self.review_state:
self.set_review_state(review_state)
Expand Down

0 comments on commit b6cf3f1

Please sign in to comment.