Get the SHA a branch's HEAD points to.

    Args:

        profile
            A profile generated from ``simplygithub.authentication.profile``.
            Such profiles tell this module (i) the ``repo`` to connect to,
            and (ii) the ``token`` to connect with.

        name
            The name of the branch.

    Returns:
        The requested SHA.

def get_branch_sha(profile, name):
    """Get the SHA a branch's HEAD points to.

    Args:

        profile
            A profile generated from ``simplygithub.authentication.profile``.
            Such profiles tell this module (i) the ``repo`` to connect to,
            and (ii) the ``token`` to connect with.

        name
            The name of the branch.

    Returns:
        The requested SHA.

    """
    ref = "heads/" + name
    data = refs.get_ref(profile, ref)
    head = data.get("head")
    sha = head.get("sha")
    return sha