(reviews: List[PRReview])
return status
Find the most recent actionable review state for a user
Find the most recent actionable review state for a user
Find the most recent actionable review state for a user
def review_status(reviews: List[PRReview]) -> PRReviewState:
    """
    Find the most recent actionable review state for a user
    """
    status = PRReviewState.COMMENTED
    for review in reviews:
        # only these events are meaningful to us
        if review.state in (
            PRReviewState.CHANGES_REQUESTED,
            PRReviewState.APPROVED,
            PRReviewState.DISMISSED,
        ):
            status = review.state
    return status
def review_status ( reviews : List [ PRReview ] ) -> PRReviewState : status = PRReviewState . COMMENTED for review in reviews : # only these events are meaningful to us if review . state in ( PRReviewState . CHANGES_REQUESTED , PRReviewState . APPROVED , PRReviewState . DISMISSED , ) : status = review . state return status