def gerrit_check(patch_url):
    """ Check if patch belongs to upstream/rdo/downstream gerrit,
    :param patch_url: Gerrit URL in a string format
    :returns gerrit: return string i.e 'upstream'/'rdo'/'downstream'
    """
    if 'redhat' in patch_url:
        return 'downstream'
    if 'review.rdoproject.org' in patch_url:
        return 'rdo'
    if 'review.opendev.org' in patch_url:
        print("We don't have ability to hold a node in upstream")
        return 'upstream'
    raise Exception(f'Unknown gerrit patch link provided: {patch_url}')