Add documentation to github.Repository.Repository.create_git_release() (#747)

This commit is contained in:
Nicholas Buse
2018-04-10 10:16:22 +08:00
committed by Wan Liuyang
parent 4da483d1c0
commit a769c2ffc1
+10
View File
@@ -830,6 +830,16 @@ class Repository(github.GithubObject.CompletableGithubObject):
return self.create_git_release(tag, release_name, release_message, draft, prerelease)
def create_git_release(self, tag, name, message, draft=False, prerelease=False, target_commitish=github.GithubObject.NotSet):
"""
:calls: `POST /repos/:owner/:repo/releases <http://developer.github.com/v3/repos/releases>`_
:param tag: string
:param name: string
:param message: string
:param draft: bool
:param prerelease: bool
:param target_commitish: string or :class:`github.Branch.Branch` or :class:`github.Commit.Commit` or :class:`github.GitCommit.GitCommit`
:rtype: :class:`github.GitRelease.GitRelease`
"""
assert isinstance(tag, (str, unicode)), tag
assert isinstance(name, (str, unicode)), name
assert isinstance(message, (str, unicode)), message