mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Add generate_release_notes parameter to create_git_release and create_git_tag_and_release (#2417)
This commit is contained in:
@@ -333,6 +333,7 @@ class GitRelease(github.GithubObject.CompletableGithubObject):
|
||||
self._target_commitish = github.GithubObject.NotSet
|
||||
self._draft = github.GithubObject.NotSet
|
||||
self._prerelease = github.GithubObject.NotSet
|
||||
self._generate_release_notes = github.GithubObject.NotSet
|
||||
self._author = github.GithubObject.NotSet
|
||||
self._url = github.GithubObject.NotSet
|
||||
self._upload_url = github.GithubObject.NotSet
|
||||
@@ -360,6 +361,10 @@ class GitRelease(github.GithubObject.CompletableGithubObject):
|
||||
self._draft = self._makeBoolAttribute(attributes["draft"])
|
||||
if "prerelease" in attributes:
|
||||
self._prerelease = self._makeBoolAttribute(attributes["prerelease"])
|
||||
if "generate_release_notes" in attributes:
|
||||
self._generate_release_notes = self._makeBoolAttribute(
|
||||
attributes["generate_release_notes"]
|
||||
)
|
||||
if "author" in attributes:
|
||||
self._author = self._makeClassAttribute(
|
||||
github.NamedUser.NamedUser, attributes["author"]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -160,6 +160,7 @@ class Repository(CompletableGithubObject):
|
||||
message: str,
|
||||
draft: bool = ...,
|
||||
prerelease: bool = ...,
|
||||
generate_release_notes: bool = ...,
|
||||
target_commitish: Union[str, _NotSetType] = ...,
|
||||
) -> GitRelease: ...
|
||||
def create_git_tag(
|
||||
@@ -181,6 +182,7 @@ class Repository(CompletableGithubObject):
|
||||
tagger: Union[InputGitAuthor, _NotSetType] = ...,
|
||||
draft: bool = ...,
|
||||
prerelease: bool = ...,
|
||||
generate_release_notes: bool = ...,
|
||||
) -> GitRelease: ...
|
||||
def create_git_tree(
|
||||
self,
|
||||
|
||||
@@ -26,7 +26,7 @@ api.github.com
|
||||
None
|
||||
/repos/rickrickston123/RepoTest/releases
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'}
|
||||
{"tag_name": "v1.25.2", "name": "release title", "body": "release message", "draft": false, "prerelease": false, "target_commitish": "813da528da46ef4cbb28d2018eaa6d4b3d56f40f"}
|
||||
{"tag_name": "v1.25.2", "name": "release title", "body": "release message", "draft": false, "prerelease": false, "generate_release_notes": false, "target_commitish": "813da528da46ef4cbb28d2018eaa6d4b3d56f40f"}
|
||||
201
|
||||
[('Server', 'GitHub.com'), ('Date', 'Tue, 14 Jul 2020 17:14:40 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '1839'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4802'), ('X-RateLimit-Reset', '1594749126'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', '"cbef1009bba70497b94cd661a0e8f188"'), ('Location', 'https://api.github.com/repos/rickrickston123/RepoTest/releases/28553914'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', '877E:0D15:11BAC33:1E1C79C:5F0DE7FF')]
|
||||
{"url":"https://api.github.com/repos/rickrickston123/RepoTest/releases/28553914","assets_url":"https://api.github.com/repos/rickrickston123/RepoTest/releases/28553914/assets","upload_url":"https://uploads.github.com/repos/rickrickston123/RepoTest/releases/28553914/assets{?name,label}","html_url":"https://github.com/rickrickston123/RepoTest/releases/tag/v1.25.2","id":28553914,"node_id":"MDc6UmVsZWFzZTI4NTUzOTE0","tag_name":"v1.25.2","target_commitish":"813da528da46ef4cbb28d2018eaa6d4b3d56f40f","name":"release title","draft":false,"author":{"login":"rickrickston123","id":64711998,"node_id":"MDQ6VXNlcjY0NzExOTk4","avatar_url":"https://avatars0.githubusercontent.com/u/64711998?v=4","gravatar_id":"","url":"https://api.github.com/users/rickrickston123","html_url":"https://github.com/rickrickston123","followers_url":"https://api.github.com/users/rickrickston123/followers","following_url":"https://api.github.com/users/rickrickston123/following{/other_user}","gists_url":"https://api.github.com/users/rickrickston123/gists{/gist_id}","starred_url":"https://api.github.com/users/rickrickston123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickrickston123/subscriptions","organizations_url":"https://api.github.com/users/rickrickston123/orgs","repos_url":"https://api.github.com/users/rickrickston123/repos","events_url":"https://api.github.com/users/rickrickston123/events{/privacy}","received_events_url":"https://api.github.com/users/rickrickston123/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2020-07-12T07:34:42Z","published_at":"2020-07-14T17:14:40Z","assets":[],"tarball_url":"https://api.github.com/repos/rickrickston123/RepoTest/tarball/v1.25.2","zipball_url":"https://api.github.com/repos/rickrickston123/RepoTest/zipball/v1.25.2","body":"release message"}
|
||||
|
||||
@@ -26,7 +26,7 @@ api.github.com
|
||||
None
|
||||
/repos/rickrickston123/RepoTest/releases
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'}
|
||||
{"tag_name": "v1.25.2", "name": "release title", "body": "release message", "draft": false, "prerelease": false, "target_commitish": "813da528da46ef4cbb28d2018eaa6d4b3d56f40f"}
|
||||
{"tag_name": "v1.25.2", "name": "release title", "body": "release message", "draft": false, "prerelease": false, "generate_release_notes": false, "target_commitish": "813da528da46ef4cbb28d2018eaa6d4b3d56f40f"}
|
||||
201
|
||||
[('Server', 'GitHub.com'), ('Date', 'Tue, 14 Jul 2020 17:14:43 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '1839'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4794'), ('X-RateLimit-Reset', '1594749125'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', '"6cc770f263309efd304dad200a5987f2"'), ('Location', 'https://api.github.com/repos/rickrickston123/RepoTest/releases/28553917'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', '87C6:72C3:9AEB34:1613408:5F0DE803')]
|
||||
{"url":"https://api.github.com/repos/rickrickston123/RepoTest/releases/28553917","assets_url":"https://api.github.com/repos/rickrickston123/RepoTest/releases/28553917/assets","upload_url":"https://uploads.github.com/repos/rickrickston123/RepoTest/releases/28553917/assets{?name,label}","html_url":"https://github.com/rickrickston123/RepoTest/releases/tag/v1.25.2","id":28553917,"node_id":"MDc6UmVsZWFzZTI4NTUzOTE3","tag_name":"v1.25.2","target_commitish":"813da528da46ef4cbb28d2018eaa6d4b3d56f40f","name":"release title","draft":false,"author":{"login":"rickrickston123","id":64711998,"node_id":"MDQ6VXNlcjY0NzExOTk4","avatar_url":"https://avatars0.githubusercontent.com/u/64711998?v=4","gravatar_id":"","url":"https://api.github.com/users/rickrickston123","html_url":"https://github.com/rickrickston123","followers_url":"https://api.github.com/users/rickrickston123/followers","following_url":"https://api.github.com/users/rickrickston123/following{/other_user}","gists_url":"https://api.github.com/users/rickrickston123/gists{/gist_id}","starred_url":"https://api.github.com/users/rickrickston123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickrickston123/subscriptions","organizations_url":"https://api.github.com/users/rickrickston123/orgs","repos_url":"https://api.github.com/users/rickrickston123/repos","events_url":"https://api.github.com/users/rickrickston123/events{/privacy}","received_events_url":"https://api.github.com/users/rickrickston123/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2020-07-12T07:34:42Z","published_at":"2020-07-14T17:14:43Z","assets":[],"tarball_url":"https://api.github.com/repos/rickrickston123/RepoTest/tarball/v1.25.2","zipball_url":"https://api.github.com/repos/rickrickston123/RepoTest/zipball/v1.25.2","body":"release message"}
|
||||
|
||||
@@ -26,7 +26,7 @@ api.github.com
|
||||
None
|
||||
/repos/rickrickston123/RepoTest/releases
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'}
|
||||
{"tag_name": "v1.25.2", "name": "release title", "body": "release message", "draft": false, "prerelease": false, "target_commitish": "813da528da46ef4cbb28d2018eaa6d4b3d56f40f"}
|
||||
{"tag_name": "v1.25.2", "name": "release title", "body": "release message", "draft": false, "prerelease": false, "generate_release_notes": false, "target_commitish": "813da528da46ef4cbb28d2018eaa6d4b3d56f40f"}
|
||||
201
|
||||
[('Server', 'GitHub.com'), ('Date', 'Tue, 14 Jul 2020 17:14:53 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '1839'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4773'), ('X-RateLimit-Reset', '1594749126'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', '"db319cddcbeed55996b30064eb2bf456"'), ('Location', 'https://api.github.com/repos/rickrickston123/RepoTest/releases/28553923'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', '8882:6F6D:F27F47:1A3F229:5F0DE80D')]
|
||||
{"url":"https://api.github.com/repos/rickrickston123/RepoTest/releases/28553923","assets_url":"https://api.github.com/repos/rickrickston123/RepoTest/releases/28553923/assets","upload_url":"https://uploads.github.com/repos/rickrickston123/RepoTest/releases/28553923/assets{?name,label}","html_url":"https://github.com/rickrickston123/RepoTest/releases/tag/v1.25.2","id":28553923,"node_id":"MDc6UmVsZWFzZTI4NTUzOTIz","tag_name":"v1.25.2","target_commitish":"813da528da46ef4cbb28d2018eaa6d4b3d56f40f","name":"release title","draft":false,"author":{"login":"rickrickston123","id":64711998,"node_id":"MDQ6VXNlcjY0NzExOTk4","avatar_url":"https://avatars0.githubusercontent.com/u/64711998?v=4","gravatar_id":"","url":"https://api.github.com/users/rickrickston123","html_url":"https://github.com/rickrickston123","followers_url":"https://api.github.com/users/rickrickston123/followers","following_url":"https://api.github.com/users/rickrickston123/following{/other_user}","gists_url":"https://api.github.com/users/rickrickston123/gists{/gist_id}","starred_url":"https://api.github.com/users/rickrickston123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickrickston123/subscriptions","organizations_url":"https://api.github.com/users/rickrickston123/orgs","repos_url":"https://api.github.com/users/rickrickston123/repos","events_url":"https://api.github.com/users/rickrickston123/events{/privacy}","received_events_url":"https://api.github.com/users/rickrickston123/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2020-07-12T07:34:42Z","published_at":"2020-07-14T17:14:53Z","assets":[],"tarball_url":"https://api.github.com/repos/rickrickston123/RepoTest/tarball/v1.25.2","zipball_url":"https://api.github.com/repos/rickrickston123/RepoTest/zipball/v1.25.2","body":"release message"}
|
||||
|
||||
@@ -26,7 +26,7 @@ api.github.com
|
||||
None
|
||||
/repos/rickrickston123/RepoTest/releases
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'}
|
||||
{"tag_name": "v1.25.2", "name": "release title", "body": "release message", "draft": false, "prerelease": false, "target_commitish": "813da528da46ef4cbb28d2018eaa6d4b3d56f40f"}
|
||||
{"tag_name": "v1.25.2", "name": "release title", "body": "release message", "draft": false, "prerelease": false, "generate_release_notes": false, "target_commitish": "813da528da46ef4cbb28d2018eaa6d4b3d56f40f"}
|
||||
201
|
||||
[('Server', 'GitHub.com'), ('Date', 'Tue, 14 Jul 2020 17:14:57 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '1839'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4764'), ('X-RateLimit-Reset', '1594749126'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', '"08734005fd9365fc591d27a27bdf992a"'), ('Location', 'https://api.github.com/repos/rickrickston123/RepoTest/releases/28553925'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', '88D4:6F6D:F280BD:1A3F57A:5F0DE811')]
|
||||
{"url":"https://api.github.com/repos/rickrickston123/RepoTest/releases/28553925","assets_url":"https://api.github.com/repos/rickrickston123/RepoTest/releases/28553925/assets","upload_url":"https://uploads.github.com/repos/rickrickston123/RepoTest/releases/28553925/assets{?name,label}","html_url":"https://github.com/rickrickston123/RepoTest/releases/tag/v1.25.2","id":28553925,"node_id":"MDc6UmVsZWFzZTI4NTUzOTI1","tag_name":"v1.25.2","target_commitish":"813da528da46ef4cbb28d2018eaa6d4b3d56f40f","name":"release title","draft":false,"author":{"login":"rickrickston123","id":64711998,"node_id":"MDQ6VXNlcjY0NzExOTk4","avatar_url":"https://avatars0.githubusercontent.com/u/64711998?v=4","gravatar_id":"","url":"https://api.github.com/users/rickrickston123","html_url":"https://github.com/rickrickston123","followers_url":"https://api.github.com/users/rickrickston123/followers","following_url":"https://api.github.com/users/rickrickston123/following{/other_user}","gists_url":"https://api.github.com/users/rickrickston123/gists{/gist_id}","starred_url":"https://api.github.com/users/rickrickston123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickrickston123/subscriptions","organizations_url":"https://api.github.com/users/rickrickston123/orgs","repos_url":"https://api.github.com/users/rickrickston123/repos","events_url":"https://api.github.com/users/rickrickston123/events{/privacy}","received_events_url":"https://api.github.com/users/rickrickston123/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2020-07-12T07:34:42Z","published_at":"2020-07-14T17:14:57Z","assets":[],"tarball_url":"https://api.github.com/repos/rickrickston123/RepoTest/tarball/v1.25.2","zipball_url":"https://api.github.com/repos/rickrickston123/RepoTest/zipball/v1.25.2","body":"release message"}
|
||||
|
||||
@@ -26,7 +26,7 @@ api.github.com
|
||||
None
|
||||
/repos/rickrickston123/RepoTest/releases
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'}
|
||||
{"tag_name": "v1.25.2", "name": "release title", "body": "release message", "draft": false, "prerelease": false, "target_commitish": "813da528da46ef4cbb28d2018eaa6d4b3d56f40f"}
|
||||
{"tag_name": "v1.25.2", "name": "release title", "body": "release message", "draft": false, "prerelease": false, "generate_release_notes": false, "target_commitish": "813da528da46ef4cbb28d2018eaa6d4b3d56f40f"}
|
||||
201
|
||||
[('Server', 'GitHub.com'), ('Date', 'Tue, 14 Jul 2020 17:15:01 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '1839'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4754'), ('X-RateLimit-Reset', '1594749126'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', '"a8961143f47acb4521819919a4413ffb"'), ('Location', 'https://api.github.com/repos/rickrickston123/RepoTest/releases/28553926'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', '8928:6F6B:5D99BC:D631D5:5F0DE815')]
|
||||
{"url":"https://api.github.com/repos/rickrickston123/RepoTest/releases/28553926","assets_url":"https://api.github.com/repos/rickrickston123/RepoTest/releases/28553926/assets","upload_url":"https://uploads.github.com/repos/rickrickston123/RepoTest/releases/28553926/assets{?name,label}","html_url":"https://github.com/rickrickston123/RepoTest/releases/tag/v1.25.2","id":28553926,"node_id":"MDc6UmVsZWFzZTI4NTUzOTI2","tag_name":"v1.25.2","target_commitish":"813da528da46ef4cbb28d2018eaa6d4b3d56f40f","name":"release title","draft":false,"author":{"login":"rickrickston123","id":64711998,"node_id":"MDQ6VXNlcjY0NzExOTk4","avatar_url":"https://avatars0.githubusercontent.com/u/64711998?v=4","gravatar_id":"","url":"https://api.github.com/users/rickrickston123","html_url":"https://github.com/rickrickston123","followers_url":"https://api.github.com/users/rickrickston123/followers","following_url":"https://api.github.com/users/rickrickston123/following{/other_user}","gists_url":"https://api.github.com/users/rickrickston123/gists{/gist_id}","starred_url":"https://api.github.com/users/rickrickston123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickrickston123/subscriptions","organizations_url":"https://api.github.com/users/rickrickston123/orgs","repos_url":"https://api.github.com/users/rickrickston123/repos","events_url":"https://api.github.com/users/rickrickston123/events{/privacy}","received_events_url":"https://api.github.com/users/rickrickston123/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2020-07-12T07:34:42Z","published_at":"2020-07-14T17:15:01Z","assets":[],"tarball_url":"https://api.github.com/repos/rickrickston123/RepoTest/tarball/v1.25.2","zipball_url":"https://api.github.com/repos/rickrickston123/RepoTest/zipball/v1.25.2","body":"release message"}
|
||||
|
||||
@@ -26,7 +26,7 @@ api.github.com
|
||||
None
|
||||
/repos/rickrickston123/RepoTest/releases
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'}
|
||||
{"tag_name": "v1.25.2", "name": "release title", "body": "release message", "draft": false, "prerelease": false, "target_commitish": "813da528da46ef4cbb28d2018eaa6d4b3d56f40f"}
|
||||
{"tag_name": "v1.25.2", "name": "release title", "body": "release message", "draft": false, "prerelease": false, "generate_release_notes": false, "target_commitish": "813da528da46ef4cbb28d2018eaa6d4b3d56f40f"}
|
||||
201
|
||||
[('Server', 'GitHub.com'), ('Date', 'Tue, 14 Jul 2020 17:15:06 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '1839'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4743'), ('X-RateLimit-Reset', '1594749126'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', '"89d1865c6ce3065f5d8de11015fa1e64"'), ('Location', 'https://api.github.com/repos/rickrickston123/RepoTest/releases/28553932'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', '8990:3C00:9EDCAC:1796F44:5F0DE81A')]
|
||||
{"url":"https://api.github.com/repos/rickrickston123/RepoTest/releases/28553932","assets_url":"https://api.github.com/repos/rickrickston123/RepoTest/releases/28553932/assets","upload_url":"https://uploads.github.com/repos/rickrickston123/RepoTest/releases/28553932/assets{?name,label}","html_url":"https://github.com/rickrickston123/RepoTest/releases/tag/v1.25.2","id":28553932,"node_id":"MDc6UmVsZWFzZTI4NTUzOTMy","tag_name":"v1.25.2","target_commitish":"813da528da46ef4cbb28d2018eaa6d4b3d56f40f","name":"release title","draft":false,"author":{"login":"rickrickston123","id":64711998,"node_id":"MDQ6VXNlcjY0NzExOTk4","avatar_url":"https://avatars0.githubusercontent.com/u/64711998?v=4","gravatar_id":"","url":"https://api.github.com/users/rickrickston123","html_url":"https://github.com/rickrickston123","followers_url":"https://api.github.com/users/rickrickston123/followers","following_url":"https://api.github.com/users/rickrickston123/following{/other_user}","gists_url":"https://api.github.com/users/rickrickston123/gists{/gist_id}","starred_url":"https://api.github.com/users/rickrickston123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickrickston123/subscriptions","organizations_url":"https://api.github.com/users/rickrickston123/orgs","repos_url":"https://api.github.com/users/rickrickston123/repos","events_url":"https://api.github.com/users/rickrickston123/events{/privacy}","received_events_url":"https://api.github.com/users/rickrickston123/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2020-07-12T07:34:42Z","published_at":"2020-07-14T17:15:06Z","assets":[],"tarball_url":"https://api.github.com/repos/rickrickston123/RepoTest/tarball/v1.25.2","zipball_url":"https://api.github.com/repos/rickrickston123/RepoTest/zipball/v1.25.2","body":"release message"}
|
||||
|
||||
@@ -26,7 +26,7 @@ api.github.com
|
||||
None
|
||||
/repos/rickrickston123/RepoTest/releases
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python', 'Content-Type': 'application/json'}
|
||||
{"tag_name": "v1.25.2", "name": "release title", "body": "release message", "draft": false, "prerelease": false, "target_commitish": "813da528da46ef4cbb28d2018eaa6d4b3d56f40f"}
|
||||
{"tag_name": "v1.25.2", "name": "release title", "body": "release message", "draft": false, "prerelease": false, "generate_release_notes": false, "target_commitish": "813da528da46ef4cbb28d2018eaa6d4b3d56f40f"}
|
||||
201
|
||||
[('Server', 'GitHub.com'), ('Date', 'Tue, 14 Jul 2020 17:15:11 GMT'), ('Content-Type', 'application/json; charset=utf-8'), ('Content-Length', '1839'), ('Status', '201 Created'), ('X-RateLimit-Limit', '5000'), ('X-RateLimit-Remaining', '4732'), ('X-RateLimit-Reset', '1594749126'), ('Cache-Control', 'private, max-age=60, s-maxage=60'), ('Vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With'), ('ETag', '"6f2d83bf7aa6f6914ff9fdf24acb3aeb"'), ('Location', 'https://api.github.com/repos/rickrickston123/RepoTest/releases/28553933'), ('X-GitHub-Media-Type', 'github.v3; format=json'), ('Access-Control-Expose-Headers', 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset'), ('Access-Control-Allow-Origin', '*'), ('Strict-Transport-Security', 'max-age=31536000; includeSubdomains; preload'), ('X-Frame-Options', 'deny'), ('X-Content-Type-Options', 'nosniff'), ('X-XSS-Protection', '1; mode=block'), ('Referrer-Policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('Content-Security-Policy', "default-src 'none'"), ('X-GitHub-Request-Id', '89EC:72AE:503A41:C99274:5F0DE81F')]
|
||||
{"url":"https://api.github.com/repos/rickrickston123/RepoTest/releases/28553933","assets_url":"https://api.github.com/repos/rickrickston123/RepoTest/releases/28553933/assets","upload_url":"https://uploads.github.com/repos/rickrickston123/RepoTest/releases/28553933/assets{?name,label}","html_url":"https://github.com/rickrickston123/RepoTest/releases/tag/v1.25.2","id":28553933,"node_id":"MDc6UmVsZWFzZTI4NTUzOTMz","tag_name":"v1.25.2","target_commitish":"813da528da46ef4cbb28d2018eaa6d4b3d56f40f","name":"release title","draft":false,"author":{"login":"rickrickston123","id":64711998,"node_id":"MDQ6VXNlcjY0NzExOTk4","avatar_url":"https://avatars0.githubusercontent.com/u/64711998?v=4","gravatar_id":"","url":"https://api.github.com/users/rickrickston123","html_url":"https://github.com/rickrickston123","followers_url":"https://api.github.com/users/rickrickston123/followers","following_url":"https://api.github.com/users/rickrickston123/following{/other_user}","gists_url":"https://api.github.com/users/rickrickston123/gists{/gist_id}","starred_url":"https://api.github.com/users/rickrickston123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickrickston123/subscriptions","organizations_url":"https://api.github.com/users/rickrickston123/orgs","repos_url":"https://api.github.com/users/rickrickston123/repos","events_url":"https://api.github.com/users/rickrickston123/events{/privacy}","received_events_url":"https://api.github.com/users/rickrickston123/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2020-07-12T07:34:42Z","published_at":"2020-07-14T17:15:11Z","assets":[],"tarball_url":"https://api.github.com/repos/rickrickston123/RepoTest/tarball/v1.25.2","zipball_url":"https://api.github.com/repos/rickrickston123/RepoTest/zipball/v1.25.2","body":"release message"}
|
||||
|
||||
@@ -4,7 +4,7 @@ api.github.com
|
||||
None
|
||||
/repos/jacquev6/PyGithub/releases
|
||||
{'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
{"body": "This release is created by PyGithub", "prerelease": false, "tag_name": "vX.Y.Z-by-PyGithub-acctest", "draft": false, "name": "vX.Y.Z: PyGithub acctest"}
|
||||
{"body": "This release is created by PyGithub", "prerelease": false, "generate_release_notes": false, "tag_name": "vX.Y.Z-by-PyGithub-acctest", "draft": false, "name": "vX.Y.Z: PyGithub acctest"}
|
||||
201
|
||||
[('content-length', '1656'), ('x-runtime-rack', '0.601694'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('etag', '"64c4aea05900ae1072ee705caf9b529c"'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/releases/7636454'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('status', '201 Created'), ('x-ratelimit-remaining', '4951'), ('x-github-media-type', 'github.v3; format=json'), ('access-control-expose-headers', 'ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', '92E2:1D39A:50FE29C:5DF3D65:59AE9019'), ('date', 'Tue, 05 Sep 2017 11:52:58 GMT'), ('access-control-allow-origin', '*'), ('content-security-policy', "default-src 'none'"), ('strict-transport-security', 'max-age=31536000; includeSubdomains; preload'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('x-frame-options', 'deny'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1504614271')]
|
||||
{"url":"https://api.github.com/repos/jacquev6/PyGithub/releases/7636454","assets_url":"https://api.github.com/repos/jacquev6/PyGithub/releases/7636454/assets","upload_url":"https://uploads.github.com/repos/jacquev6/PyGithub/releases/7636454/assets{?name,label}","html_url":"https://github.com/jacquev6/PyGithub/releases/tag/vX.Y.Z-by-PyGithub-acctest","id":7636454,"tag_name":"vX.Y.Z-by-PyGithub-acctest","target_commitish":"master","name":"vX.Y.Z: PyGithub acctest","draft":false,"author":{"login":"jacquev6","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/jacquev6","html_url":"https://github.com/jacquev6","followers_url":"https://api.github.com/users/jacquev6/followers","following_url":"https://api.github.com/users/jacquev6/following{/other_user}","gists_url":"https://api.github.com/users/jacquev6/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquev6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquev6/subscriptions","organizations_url":"https://api.github.com/users/jacquev6/orgs","repos_url":"https://api.github.com/users/jacquev6/repos","events_url":"https://api.github.com/users/jacquev6/events{/privacy}","received_events_url":"https://api.github.com/users/jacquev6/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2016-10-29T02:39:27Z","published_at":"2017-09-05T11:52:58Z","assets":[],"tarball_url":"https://api.github.com/repos/jacquev6/PyGithub/tarball/vX.Y.Z-by-PyGithub-acctest","zipball_url":"https://api.github.com/repos/jacquev6/PyGithub/zipball/vX.Y.Z-by-PyGithub-acctest","body":"This release is created by PyGithub"}
|
||||
|
||||
@@ -4,7 +4,7 @@ api.github.com
|
||||
None
|
||||
/repos/jacquev6/PyGithub/releases
|
||||
{'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
{"body": "This release is also created by PyGithub", "name": "vX.Y.Z: PyGithub acctest2", "target_commitish": "da9a285fd8b782461e56cba39ae8d2fa41ca7cdc", "tag_name": "vX.Y.Z-by-PyGithub-acctest2", "prerelease": true, "draft": false}
|
||||
{"body": "This release is also created by PyGithub", "name": "vX.Y.Z: PyGithub acctest2", "target_commitish": "da9a285fd8b782461e56cba39ae8d2fa41ca7cdc", "tag_name": "vX.Y.Z-by-PyGithub-acctest2", "prerelease": true, "generate_release_notes": false, "draft": false}
|
||||
201
|
||||
[('content-length', '1699'), ('x-runtime-rack', '0.625656'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('etag', '"a640b19b9bc4596ddf16593f4d811ee0"'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/releases/7636488'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('status', '201 Created'), ('x-ratelimit-remaining', '4945'), ('x-github-media-type', 'github.v3; format=json'), ('access-control-expose-headers', 'ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', '958E:1D39A:510378D:5DF9FCA:59AE9091'), ('date', 'Tue, 05 Sep 2017 11:54:58 GMT'), ('access-control-allow-origin', '*'), ('content-security-policy', "default-src 'none'"), ('strict-transport-security', 'max-age=31536000; includeSubdomains; preload'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('x-frame-options', 'deny'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1504614271')]
|
||||
{"url":"https://api.github.com/repos/jacquev6/PyGithub/releases/7636488","assets_url":"https://api.github.com/repos/jacquev6/PyGithub/releases/7636488/assets","upload_url":"https://uploads.github.com/repos/jacquev6/PyGithub/releases/7636488/assets{?name,label}","html_url":"https://github.com/jacquev6/PyGithub/releases/tag/vX.Y.Z-by-PyGithub-acctest2","id":7636488,"tag_name":"vX.Y.Z-by-PyGithub-acctest2","target_commitish":"da9a285fd8b782461e56cba39ae8d2fa41ca7cdc","name":"vX.Y.Z: PyGithub acctest2","draft":false,"author":{"login":"jacquev6","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/jacquev6","html_url":"https://github.com/jacquev6","followers_url":"https://api.github.com/users/jacquev6/followers","following_url":"https://api.github.com/users/jacquev6/following{/other_user}","gists_url":"https://api.github.com/users/jacquev6/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquev6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquev6/subscriptions","organizations_url":"https://api.github.com/users/jacquev6/orgs","repos_url":"https://api.github.com/users/jacquev6/repos","events_url":"https://api.github.com/users/jacquev6/events{/privacy}","received_events_url":"https://api.github.com/users/jacquev6/received_events","type":"User","site_admin":false},"prerelease":true,"created_at":"2017-09-05T11:35:41Z","published_at":"2017-09-05T11:54:58Z","assets":[],"tarball_url":"https://api.github.com/repos/jacquev6/PyGithub/tarball/vX.Y.Z-by-PyGithub-acctest2","zipball_url":"https://api.github.com/repos/jacquev6/PyGithub/zipball/vX.Y.Z-by-PyGithub-acctest2","body":"This release is also created by PyGithub"}
|
||||
|
||||
@@ -377,6 +377,7 @@ class Repository(Framework.TestCase):
|
||||
"This release is also created by PyGithub",
|
||||
False,
|
||||
True,
|
||||
False,
|
||||
"da9a285fd8b782461e56cba39ae8d2fa41ca7cdc",
|
||||
)
|
||||
self.assertEqual(release.tag_name, "vX.Y.Z-by-PyGithub-acctest2")
|
||||
|
||||
Reference in New Issue
Block a user