(*, pr: Dict[str, Any])
return review_requests
parse from: https://developer.github.com/v4/union/requestedreviewer/
parse from: https://developer.github.com/v4/union/requestedreviewer/
parse from : https : // developer . github . com / v4 / union / requestedreviewer /
def get_requested_reviews(*, pr: Dict[str, Any]) -> List[PRReviewRequest]:
    """
    parse from: https://developer.github.com/v4/union/requestedreviewer/
    """
    review_requests: List[PRReviewRequest] = []
    for request_dict in get_review_requests_dicts(pr=pr):
        try:
            request = request_dict["requestedReviewer"]
            typename = request["__typename"]
            if typename in {"User", "Mannequin"}:
                name = request["login"]
            else:
                name = request["name"]
            review_requests.append(PRReviewRequest(name=name))
        except ValueError:
            logger.warning("Could not parse PRReviewRequest", exc_info=True)
    return review_requests
def get_requested_reviews ( * , pr : Dict [ str , Any ] ) -> List [ PRReviewRequest ] : review_requests : List [ PRReviewRequest ] = [ ] for request_dict in get_review_requests_dicts ( pr = pr ) : try : request = request_dict [ "requestedReviewer" ] typename = request [ "__typename" ] if typename in { "User" , "Mannequin" } : name = request [ "login" ] else : name = request [ "name" ] review_requests . append ( PRReviewRequest ( name = name ) ) except ValueError : logger . warning ( "Could not parse PRReviewRequest" , exc_info = True ) return review_requests