def update_release(self, name, message, draft=False, prerelease=False,<EOL>tag_name=github.GithubObject.NotSet,<EOL>target_commitish=github.GithubObject.NotSet):
assert tag_name is github.GithubObject.NotSetor isinstance(tag_name, (str, unicode)),'<STR_LIT>'<EOL>assert target_commitish is github.GithubObject.NotSetor isinstance(target_commitish, (str, unicode)),'<STR_LIT>'<EOL>assert isinstance(name, (str, unicode)), name<EOL>assert isinstance(message, (str, unicode)), message<EOL>assert isinstance(draft, bool), draft<EOL>assert isinstance(prerelease, bool), prerelease<EOL>if tag_name is github.GithubObject.NotSet:<EOL><INDENT>tag_name = self.tag_name<EOL><DEDENT>post_parameters = {<EOL>"<STR_LIT>": tag_name,<EOL>"<STR_LIT:name>": name,<EOL>"<STR_LIT:body>": message,<EOL>"<STR_LIT>": draft,<EOL>"<STR_LIT>": prerelease,<EOL>}<EOL>if target_commitish is not github.GithubObject.NotSet:<EOL><INDENT>post_parameters['<STR_LIT>'] = target_commitish<EOL><DEDENT>headers, data = self._requester.requestJsonAndCheck(<EOL>"<STR_LIT>",<EOL>self.url,<EOL>input=post_parameters<EOL>)<EOL>return github.GitRelease.GitRelease(self._requester, headers, data, completed=True)<EOL>
:calls: `PATCH /repos/:owner/:repo/releases/:release_id <https://developer.github.com/v3/repos/releases/#edit-a-release>`_
:rtype: :class:`github.GitRelease.GitRelease`