Point a ref to a new SHA.

    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.

        ref
            The ref to update, e.g., ``heads/my-feature-branch``.

        sha
            The SHA of the commit to point the ref to.

    Returns
        A dict with data about the ref.

def update_ref(profile, ref, sha):
    """Point a ref to a new SHA.

    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.

        ref
            The ref to update, e.g., ``heads/my-feature-branch``.

        sha
            The SHA of the commit to point the ref to.

    Returns
        A dict with data about the ref.

    """
    resource = "/refs/" + ref
    payload = {"sha": sha}
    data = api.patch_request(profile, resource, payload)
    return prepare(data)