def get_repo(task, source_env_prefix):
    """Get the repo for a task.

    Args:
        task (ChainOfTrust or LinkOfTrust): the trust object to inspect
        source_env_prefix (str): The environment variable prefix that is used
            to get repository information.

    Returns:
        str: the source url.
        None: if not defined for this task.

    """
    repo = _extract_from_env_in_payload(task, source_env_prefix + '_HEAD_REPOSITORY')
    if repo is not None:
        repo = repo.rstrip('/')
    return repo
def get_repo ( task , source_env_prefix ) : repo = _extract_from_env_in_payload ( task , source_env_prefix + '_HEAD_REPOSITORY' ) if repo is not None : repo = repo . rstrip ( '/' ) return repo
Get the repo for a task.

    Args:
        task (ChainOfTrust or LinkOfTrust): the trust object to inspect
        source_env_prefix (str): The environment variable prefix that is used
            to get repository information.

    Returns:
        str: the source url.
        None: if not defined for this task.