(*, pr: Dict[str, Any])
return [node.commit for node in nodes]
Extract the commit authors from the pull request commits.
Extract the commit authors from the pull request commits.
Extract the commit authors from the pull request commits .
def get_commits(*, pr: Dict[str, Any]) -> List[Commit]:
    """
    Extract the commit authors from the pull request commits.
    """
    # we use a dict as an ordered set.
    try:
        pull_request = PullRequest.parse_obj(pr)
    except pydantic.ValidationError:
        logger.exception("problem parsing commit authors")
        return []
    nodes = pull_request.commitHistory.nodes
    if not nodes:
        return []
    return [node.commit for node in nodes]
def get_commits ( * , pr : Dict [ str , Any ] ) -> List [ Commit ] : # we use a dict as an ordered set. try : pull_request = PullRequest . parse_obj ( pr ) except pydantic . ValidationError : logger . exception ( "problem parsing commit authors" ) return [ ] nodes = pull_request . commitHistory . nodes if not nodes : return [ ] return [ node . commit for node in nodes ]