Add generate_release_notes parameter to create_git_release and create_git_tag_and_release (#2417)

This commit is contained in:
Wojciech Barczyński
2023-05-23 15:53:33 +02:00
committed by GitHub
parent c2f12bdc09
commit 49b3ae16bf
13 changed files with 24 additions and 9 deletions
+7
View File
@@ -1053,6 +1053,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
tagger=github.GithubObject.NotSet,
draft=False,
prerelease=False,
generate_release_notes=False,
):
"""
Convenience function that calls :meth:`Repository.create_git_tag` and
@@ -1066,6 +1067,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
:param tagger: :class:github.InputGitAuthor.InputGitAuthor
:param draft: bool
:param prerelease: bool
:param generate_release_notes: bool
:rtype: :class:`github.GitRelease.GitRelease`
"""
self.create_git_tag(tag, tag_message, object, type, tagger)
@@ -1075,6 +1077,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
release_message,
draft,
prerelease,
generate_release_notes,
target_commitish=object,
)
@@ -1085,6 +1088,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
message,
draft=False,
prerelease=False,
generate_release_notes=False,
target_commitish=github.GithubObject.NotSet,
):
"""
@@ -1094,6 +1098,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
:param message: string
:param draft: bool
:param prerelease: bool
:param generate_release_notes: 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`
"""
@@ -1102,6 +1107,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
assert isinstance(message, str), message
assert isinstance(draft, bool), draft
assert isinstance(prerelease, bool), prerelease
assert isinstance(generate_release_notes, bool), generate_release_notes
assert target_commitish is github.GithubObject.NotSet or isinstance(
target_commitish,
(
@@ -1117,6 +1123,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
"body": message,
"draft": draft,
"prerelease": prerelease,
"generate_release_notes": generate_release_notes,
}
if isinstance(target_commitish, str):
post_parameters["target_commitish"] = target_commitish