diff --git a/github/PullRequest.py b/github/PullRequest.py index 82bebdc6..4e9365f5 100644 --- a/github/PullRequest.py +++ b/github/PullRequest.py @@ -586,7 +586,6 @@ class PullRequest(github.GithubObject.CompletableGithubObject): headers, data = self._requester.requestJsonAndCheck( "GET", self.url + "/reviews/" + str(id), - headers={'Accept': 'application/vnd.github.black-cat-preview+json'} ) return github.PullRequestReview.PullRequestReview(self._requester, headers, data, completed=True) @@ -600,7 +599,6 @@ class PullRequest(github.GithubObject.CompletableGithubObject): self._requester, self.url + "/reviews", None, - headers={'Accept': 'application/vnd.github.black-cat-preview+json'} ) def get_reviewer_requests(self): @@ -613,7 +611,6 @@ class PullRequest(github.GithubObject.CompletableGithubObject): self._requester, self.url + "/requested_reviewers", None, - headers={'Accept': 'application/vnd.github.black-cat-preview+json'}, list_item='users' ) diff --git a/github/tests/ReplayData/PullRequestReview.setUp.txt b/github/tests/ReplayData/PullRequestReview.setUp.txt index 05196c05..87f99bbe 100644 --- a/github/tests/ReplayData/PullRequestReview.setUp.txt +++ b/github/tests/ReplayData/PullRequestReview.setUp.txt @@ -36,9 +36,9 @@ GET api.github.com None /repos/PyGithub/PyGithub/pulls/538/reviews/28482091 -{'Authorization': 'Basic login_and_password_removed', 'Accept': 'application/vnd.github.black-cat-preview+json', 'User-Agent': 'PyGithub/Python'} +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('content-length', '1418'), ('x-runtime-rack', '0.166821'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-oauth-scopes', 'admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('x-accepted-oauth-scopes', ''), ('etag', '"d9b71d9dcbbca4b597df3b00efc8cb2a"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('referrer-policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('status', '200 OK'), ('x-ratelimit-remaining', '4545'), ('x-github-media-type', 'github.v3; param=black-cat-preview; format=json'), ('access-control-expose-headers', 'ETag, Link, 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-request-id', 'DDDD:9B6D:C86D83:EADA76:5AB118D3'), ('date', 'Tue, 20 Mar 2018 14:21:09 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', '1521556163')] +[('content-length', '1418'), ('x-runtime-rack', '0.166821'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-oauth-scopes', 'admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('x-accepted-oauth-scopes', ''), ('etag', '"d9b71d9dcbbca4b597df3b00efc8cb2a"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('referrer-policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('status', '200 OK'), ('x-ratelimit-remaining', '4545'), ('x-github-media-type', 'github.v3; format=json'), ('access-control-expose-headers', 'ETag, Link, 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-request-id', 'DDDD:9B6D:C86D83:EADA76:5AB118D3'), ('date', 'Tue, 20 Mar 2018 14:21:09 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', '1521556163')] {"id":28482091,"user":{"login":"jzelinskie","id":343539,"avatar_url":"https://avatars3.githubusercontent.com/u/343539?v=4","gravatar_id":"","url":"https://api.github.com/users/jzelinskie","html_url":"https://github.com/jzelinskie","followers_url":"https://api.github.com/users/jzelinskie/followers","following_url":"https://api.github.com/users/jzelinskie/following{/other_user}","gists_url":"https://api.github.com/users/jzelinskie/gists{/gist_id}","starred_url":"https://api.github.com/users/jzelinskie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzelinskie/subscriptions","organizations_url":"https://api.github.com/users/jzelinskie/orgs","repos_url":"https://api.github.com/users/jzelinskie/repos","events_url":"https://api.github.com/users/jzelinskie/events{/privacy}","received_events_url":"https://api.github.com/users/jzelinskie/received_events","type":"User","site_admin":false},"body":"","state":"APPROVED","html_url":"https://github.com/PyGithub/PyGithub/pull/538#pullrequestreview-28482091","pull_request_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538","author_association":"OWNER","_links":{"html":{"href":"https://github.com/PyGithub/PyGithub/pull/538#pullrequestreview-28482091"},"pull_request":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538"}},"submitted_at":"2017-03-22T19:06:59Z","commit_id":"7a0fcb27b7cd6c346fc3f76216ccb6e0f4ca3bcc"} diff --git a/github/tests/ReplayData/PullRequestReview.testAttributes.txt b/github/tests/ReplayData/PullRequestReview.testAttributes.txt index 41cbd421..c4d63d5f 100644 --- a/github/tests/ReplayData/PullRequestReview.testAttributes.txt +++ b/github/tests/ReplayData/PullRequestReview.testAttributes.txt @@ -3,9 +3,9 @@ GET api.github.com None /repos/PyGithub/PyGithub/pulls/538/reviews -{'Authorization': 'Basic login_and_password_removed', 'Accept': 'application/vnd.github.black-cat-preview+json', 'User-Agent': 'PyGithub/Python'} +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('content-length', '7095'), ('x-runtime-rack', '0.201492'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-oauth-scopes', 'admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('x-accepted-oauth-scopes', ''), ('etag', '"61fe90332e025151d7eab5b709ae744f"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('referrer-policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('status', '200 OK'), ('x-ratelimit-remaining', '4544'), ('x-github-media-type', 'github.v3; param=black-cat-preview; format=json'), ('access-control-expose-headers', 'ETag, Link, 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-request-id', 'DDDE:9B6D:C86EB2:EADBEC:5AB118D5'), ('date', 'Tue, 20 Mar 2018 14:21:10 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', '1521556163')] +[('content-length', '7095'), ('x-runtime-rack', '0.201492'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-oauth-scopes', 'admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('x-accepted-oauth-scopes', ''), ('etag', '"61fe90332e025151d7eab5b709ae744f"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('referrer-policy', 'origin-when-cross-origin, strict-origin-when-cross-origin'), ('status', '200 OK'), ('x-ratelimit-remaining', '4544'), ('x-github-media-type', 'github.v3; format=json'), ('access-control-expose-headers', 'ETag, Link, 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-request-id', 'DDDE:9B6D:C86EB2:EADBEC:5AB118D5'), ('date', 'Tue, 20 Mar 2018 14:21:10 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', '1521556163')] [{"id":28482091,"user":{"login":"jzelinskie","id":343539,"avatar_url":"https://avatars3.githubusercontent.com/u/343539?v=4","gravatar_id":"","url":"https://api.github.com/users/jzelinskie","html_url":"https://github.com/jzelinskie","followers_url":"https://api.github.com/users/jzelinskie/followers","following_url":"https://api.github.com/users/jzelinskie/following{/other_user}","gists_url":"https://api.github.com/users/jzelinskie/gists{/gist_id}","starred_url":"https://api.github.com/users/jzelinskie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzelinskie/subscriptions","organizations_url":"https://api.github.com/users/jzelinskie/orgs","repos_url":"https://api.github.com/users/jzelinskie/repos","events_url":"https://api.github.com/users/jzelinskie/events{/privacy}","received_events_url":"https://api.github.com/users/jzelinskie/received_events","type":"User","site_admin":false},"body":"","state":"APPROVED","html_url":"https://github.com/PyGithub/PyGithub/pull/538#pullrequestreview-28482091","pull_request_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538","author_association":"OWNER","_links":{"html":{"href":"https://github.com/PyGithub/PyGithub/pull/538#pullrequestreview-28482091"},"pull_request":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538"}},"submitted_at":"2017-03-22T19:06:59Z","commit_id":"7a0fcb27b7cd6c346fc3f76216ccb6e0f4ca3bcc"},{"id":104584375,"user":{"login":"electrofelix","id":912324,"avatar_url":"https://avatars1.githubusercontent.com/u/912324?v=4","gravatar_id":"","url":"https://api.github.com/users/electrofelix","html_url":"https://github.com/electrofelix","followers_url":"https://api.github.com/users/electrofelix/followers","following_url":"https://api.github.com/users/electrofelix/following{/other_user}","gists_url":"https://api.github.com/users/electrofelix/gists{/gist_id}","starred_url":"https://api.github.com/users/electrofelix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electrofelix/subscriptions","organizations_url":"https://api.github.com/users/electrofelix/orgs","repos_url":"https://api.github.com/users/electrofelix/repos","events_url":"https://api.github.com/users/electrofelix/events{/privacy}","received_events_url":"https://api.github.com/users/electrofelix/received_events","type":"User","site_admin":false},"body":"Some review created by PyGithub","state":"COMMENTED","html_url":"https://github.com/PyGithub/PyGithub/pull/538#pullrequestreview-104584375","pull_request_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538","author_association":"CONTRIBUTOR","_links":{"html":{"href":"https://github.com/PyGithub/PyGithub/pull/538#pullrequestreview-104584375"},"pull_request":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538"}},"submitted_at":"2018-03-16T14:23:47Z","commit_id":"2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52"},{"id":105360043,"user":{"login":"sfdye","id":1016390,"avatar_url":"https://avatars2.githubusercontent.com/u/1016390?v=4","gravatar_id":"","url":"https://api.github.com/users/sfdye","html_url":"https://github.com/sfdye","followers_url":"https://api.github.com/users/sfdye/followers","following_url":"https://api.github.com/users/sfdye/following{/other_user}","gists_url":"https://api.github.com/users/sfdye/gists{/gist_id}","starred_url":"https://api.github.com/users/sfdye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfdye/subscriptions","organizations_url":"https://api.github.com/users/sfdye/orgs","repos_url":"https://api.github.com/users/sfdye/repos","events_url":"https://api.github.com/users/sfdye/events{/privacy}","received_events_url":"https://api.github.com/users/sfdye/received_events","type":"User","site_admin":false},"body":"Some review created by PyGithub","state":"COMMENTED","html_url":"https://github.com/PyGithub/PyGithub/pull/538#pullrequestreview-105360043","pull_request_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538","author_association":"MEMBER","_links":{"html":{"href":"https://github.com/PyGithub/PyGithub/pull/538#pullrequestreview-105360043"},"pull_request":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538"}},"submitted_at":"2018-03-20T14:03:38Z","commit_id":"2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52"},{"id":105365629,"user":{"login":"sfdye","id":1016390,"avatar_url":"https://avatars2.githubusercontent.com/u/1016390?v=4","gravatar_id":"","url":"https://api.github.com/users/sfdye","html_url":"https://github.com/sfdye","followers_url":"https://api.github.com/users/sfdye/followers","following_url":"https://api.github.com/users/sfdye/following{/other_user}","gists_url":"https://api.github.com/users/sfdye/gists{/gist_id}","starred_url":"https://api.github.com/users/sfdye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfdye/subscriptions","organizations_url":"https://api.github.com/users/sfdye/orgs","repos_url":"https://api.github.com/users/sfdye/repos","events_url":"https://api.github.com/users/sfdye/events{/privacy}","received_events_url":"https://api.github.com/users/sfdye/received_events","type":"User","site_admin":false},"body":"Some review created by PyGithub","state":"COMMENTED","html_url":"https://github.com/PyGithub/PyGithub/pull/538#pullrequestreview-105365629","pull_request_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538","author_association":"MEMBER","_links":{"html":{"href":"https://github.com/PyGithub/PyGithub/pull/538#pullrequestreview-105365629"},"pull_request":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538"}},"submitted_at":"2018-03-20T14:15:45Z","commit_id":"2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52"},{"id":105368184,"user":{"login":"sfdye","id":1016390,"avatar_url":"https://avatars2.githubusercontent.com/u/1016390?v=4","gravatar_id":"","url":"https://api.github.com/users/sfdye","html_url":"https://github.com/sfdye","followers_url":"https://api.github.com/users/sfdye/followers","following_url":"https://api.github.com/users/sfdye/following{/other_user}","gists_url":"https://api.github.com/users/sfdye/gists{/gist_id}","starred_url":"https://api.github.com/users/sfdye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfdye/subscriptions","organizations_url":"https://api.github.com/users/sfdye/orgs","repos_url":"https://api.github.com/users/sfdye/repos","events_url":"https://api.github.com/users/sfdye/events{/privacy}","received_events_url":"https://api.github.com/users/sfdye/received_events","type":"User","site_admin":false},"body":"Some review created by PyGithub","state":"COMMENTED","html_url":"https://github.com/PyGithub/PyGithub/pull/538#pullrequestreview-105368184","pull_request_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538","author_association":"MEMBER","_links":{"html":{"href":"https://github.com/PyGithub/PyGithub/pull/538#pullrequestreview-105368184"},"pull_request":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538"}},"submitted_at":"2018-03-20T14:21:07Z","commit_id":"2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52"}] diff --git a/github/tests/ReplayData/PullRequestReviewerRequests.setUp.txt b/github/tests/ReplayData/PullRequestReviewerRequests.setUp.txt index 562c425b..64fabdfa 100644 --- a/github/tests/ReplayData/PullRequestReviewerRequests.setUp.txt +++ b/github/tests/ReplayData/PullRequestReviewerRequests.setUp.txt @@ -14,9 +14,9 @@ GET api.github.com None /repos/PyGithub/PyGithub/pulls/538/requested_reviewers -{'Authorization': 'Basic login_and_password_removed', 'Accept': 'application/vnd.github.black-cat-preview+json', 'User-Agent': 'PyGithub/Python'} +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('content-length', '839'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-served-by', '07ff1c8a09e44b62e277fae50a1b1dc4'), ('x-oauth-scopes', 'gist, repo, user'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('x-accepted-oauth-scopes', ''), ('etag', '"bc596203c153ef71a3f3e99a908de946"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('status', '200 OK'), ('x-ratelimit-remaining', '4951'), ('x-github-media-type', 'github.black-cat-preview; 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', 'C19B:69EB:2590DF2:2ECC945:58D559AE'), ('date', 'Fri, 24 Mar 2017 17:38:55 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', '1490379624')] +[('content-length', '839'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-served-by', '07ff1c8a09e44b62e277fae50a1b1dc4'), ('x-oauth-scopes', 'gist, repo, user'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('x-accepted-oauth-scopes', ''), ('etag', '"bc596203c153ef71a3f3e99a908de946"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('status', '200 OK'), ('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', 'C19B:69EB:2590DF2:2ECC945:58D559AE'), ('date', 'Fri, 24 Mar 2017 17:38:55 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', '1490379624')] [{"login":"jayfk","id":2930472,"avatar_url":"https://avatars1.githubusercontent.com/u/2930472?v=3","gravatar_id":"","url":"https://api.github.com/users/jayfk","html_url":"https://github.com/jayfk","followers_url":"https://api.github.com/users/jayfk/followers","following_url":"https://api.github.com/users/jayfk/following{/other_user}","gists_url":"https://api.github.com/users/jayfk/gists{/gist_id}","starred_url":"https://api.github.com/users/jayfk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayfk/subscriptions","organizations_url":"https://api.github.com/users/jayfk/orgs","repos_url":"https://api.github.com/users/jayfk/repos","events_url":"https://api.github.com/users/jayfk/events{/privacy}","received_events_url":"https://api.github.com/users/jayfk/received_events","type":"User","site_admin":false}]