def merge(self, base, head, commit_message=github.GithubObject.NotSet):
assert isinstance(base, (str, unicode)), base<EOL>assert isinstance(head, (str, unicode)), head<EOL>assert commit_message is github.GithubObject.NotSet or isinstance(commit_message, (str, unicode)), commit_message<EOL>post_parameters = {<EOL>"<STR_LIT>": base,<EOL>"<STR_LIT>": head,<EOL>}<EOL>if commit_message is not github.GithubObject.NotSet:<EOL><INDENT>post_parameters["<STR_LIT>"] = commit_message<EOL><DEDENT>headers, data = self._requester.requestJsonAndCheck(<EOL>"<STR_LIT:POST>",<EOL>self.url + "<STR_LIT>",<EOL>input=post_parameters<EOL>)<EOL>if data is None:<EOL><INDENT>return None<EOL><DEDENT>else:<EOL><INDENT>return github.Commit.Commit(self._requester, headers, data, completed=True)<EOL><DEDENT>
:calls: `POST /repos/:owner/:repo/merges <http://developer.github.com/v3/repos/merging>`_
:param base: string
:param head: string
:param commit_message: string
:rtype: :class:`github.Commit.Commit`