Do a POST request to Github's API to merge.

    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.

        payload
            A dict of information to pass to Github's API as the payload for
            a merge request, something like this::

                { "base": <base>, "head": <head>, "commit_message": <mesg>}

    Returns:
        The response returned by the ``requests`` library when it does the
        POST request.

def post_merge_request(profile, payload):
    """Do a POST request to Github's API to merge.

    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.

        payload
            A dict of information to pass to Github's API as the payload for
            a merge request, something like this::

                { "base": <base>, "head": <head>, "commit_message": <mesg>}

    Returns:
        The response returned by the ``requests`` library when it does the
        POST request.

    """
    repo = profile["repo"]
    url = GITHUB_API_BASE_URL + "repos/" + repo + "/merges"
    headers = get_headers(profile)
    response = requests.post(url, json=payload, headers=headers)
    return response