import re


def extract_branch_from_log_line(value: str) -> str:
    """parses a git logging statement for a branch name

    ex: 6a3214af0e61 update for test of gfortran_8.3.0_mpiuni_O_develop with hash v8.3.0b08-5-g64eb133 on discover [ci skip] -> develop

    """
    pattern = r"(_[Og]_)(.*)(\swith.*)"
    result = re.search(pattern, value)
    if result is not None:
        return result.group(2)
    return ""