'Perform a merge from ``head`` into ``base``.
:param str base: (required), where you\'re merging into
:param str head: (required), where you\'re merging from
:param str message: (optional), message to be used for the commit
:returns: :class:`RepoCommit <github3.repos.commit.RepoCommit>`'

@requires_auth
def merge(self, base, head, message=u''):

    url = self._build_url(u'merges', base_url=self._api)
    data = {u'base': base, u'head': head}
    if message:
        data[u'commit_message'] = message
    json = self._json(self._post(url, data=data), 201)
    return self._instance_or_null(RepoCommit, json)
