From 162f0397bccfbb2cbd6d74b95d44546a482834a9 Mon Sep 17 00:00:00 2001 From: Gilad Shefer Date: Tue, 20 Mar 2018 16:28:39 +0200 Subject: [PATCH] Added option to create review for Pull request (#662) * Added option to create review for Pull request * Fix tests --- github/PullRequest.py | 25 ++++++++++++++++ github/tests/PullRequestReview.py | 7 +++++ .../ReplayData/PullRequest.testGetCommits.txt | 1 - .../ReplayData/PullRequestReview.setUp.txt | 30 ++++++++++++++++--- .../PullRequestReview.testAttributes.txt | 11 +++++++ 5 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 github/tests/ReplayData/PullRequestReview.testAttributes.txt diff --git a/github/PullRequest.py b/github/PullRequest.py index ac5d736f..6d1606b9 100644 --- a/github/PullRequest.py +++ b/github/PullRequest.py @@ -392,6 +392,31 @@ class PullRequest(github.GithubObject.CompletableGithubObject): ) return github.IssueComment.IssueComment(self._requester, headers, data, completed=True) + def create_review(self, commit, body, event=github.GithubObject.NotSet, comments=github.GithubObject.NotSet): + """ + :calls: `POST /repos/:owner/:repo/pulls/:number/reviews `_ + :param commit: github.Commit.Commit + :param body: string + :param event: string + :param comments: list + :rtype: :class:`github.PullRequestReview.PullRequestReview` + """ + assert isinstance(commit, github.Commit.Commit), commit + assert isinstance(body, str), body + assert event is github.GithubObject.NotSet or isinstance(event, str), event + assert comments is github.GithubObject.NotSet or isinstance(comments, list), comments + post_parameters = {'commit_id': commit.sha, 'body': body} + post_parameters['event'] = 'COMMENT' if event == github.GithubObject.NotSet else event + if comments is github.GithubObject.NotSet: + post_parameters['comments'] = [] + headers, data = self._requester.requestJsonAndCheck( + "POST", + self.url + "/reviews", + input=post_parameters + ) + self._useAttributes(data) + return github.PullRequestReview.PullRequestReview(self._requester, headers, data, completed=True) + def edit(self, title=github.GithubObject.NotSet, body=github.GithubObject.NotSet, state=github.GithubObject.NotSet, base=github.GithubObject.NotSet): """ :calls: `PATCH /repos/:owner/:repo/pulls/:number `_ diff --git a/github/tests/PullRequestReview.py b/github/tests/PullRequestReview.py index 8c1b4fb5..6c32e662 100644 --- a/github/tests/PullRequestReview.py +++ b/github/tests/PullRequestReview.py @@ -36,6 +36,12 @@ class PullRequestReview(Framework.TestCase): self.repo = self.g.get_repo("PyGithub/PyGithub") self.pull = self.repo.get_pull(538) + # Test ability to create a review + self.created_pullreview = self.pull.create_review( + self.repo.get_commit('2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52'), + 'Some review created by PyGithub' + ) + # Test ability to get all reviews self.pullreviews = self.pull.get_reviews() @@ -51,6 +57,7 @@ class PullRequestReview(Framework.TestCase): self.assertEqual(self.pullreview.html_url, "https://github.com/PyGithub/PyGithub/pull/538#pullrequestreview-28482091") self.assertEqual(self.pullreview.pull_request_url, "https://api.github.com/repos/PyGithub/PyGithub/pulls/538") self.assertEqual(self.pullreview.submitted_at, datetime.datetime(2017, 3, 22, 19, 6, 59)) + self.assertIn(self.created_pullreview, self.pullreviews) # test __repr__() based on this attributes self.assertEqual(self.pullreview.__repr__(), 'PullRequestReview(user=NamedUser(login="jzelinskie"), id=28482091)') diff --git a/github/tests/ReplayData/PullRequest.testGetCommits.txt b/github/tests/ReplayData/PullRequest.testGetCommits.txt index d1517454..2ca18f9a 100644 --- a/github/tests/ReplayData/PullRequest.testGetCommits.txt +++ b/github/tests/ReplayData/PullRequest.testGetCommits.txt @@ -8,4 +8,3 @@ None 200 [('status', '200 OK'), ('x-ratelimit-remaining', '4975'), ('content-length', '4531'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"b4ea459213c1dd415628476619cbbc25"'), ('date', 'Sun, 27 May 2012 10:20:23 GMT'), ('content-type', 'application/json; charset=utf-8')] [{"author":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"url":"https://api.github.com/repos/jacquev6/PyGithub/commits/4aadfff21cdd2d2566b0e4bd7309c233b5f4ae23","committer":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"sha":"4aadfff21cdd2d2566b0e4bd7309c233b5f4ae23","parents":[{"url":"https://api.github.com/repos/jacquev6/PyGithub/commits/ed866fc43833802ab553e5ff8581c81bb00dd433","sha":"ed866fc43833802ab553e5ff8581c81bb00dd433"}],"commit":{"author":{"email":"vincent@vincent-jacques.net","name":"Vincent Jacques","date":"2012-05-27T00:33:23-07:00"},"url":"https://api.github.com/repos/jacquev6/PyGithub/git/commits/4aadfff21cdd2d2566b0e4bd7309c233b5f4ae23","message":"Improve test coverage","committer":{"email":"vincent@vincent-jacques.net","name":"Vincent Jacques","date":"2012-05-27T00:33:23-07:00"},"tree":{"url":"https://api.github.com/repos/jacquev6/PyGithub/git/trees/3447efc7d0f2e0197a722c55c13cde7417d1f2d3","sha":"3447efc7d0f2e0197a722c55c13cde7417d1f2d3"}}},{"author":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"url":"https://api.github.com/repos/jacquev6/PyGithub/commits/93dcae5cf207de376c91d0599226e7c7563e1d16","committer":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"sha":"93dcae5cf207de376c91d0599226e7c7563e1d16","parents":[{"url":"https://api.github.com/repos/jacquev6/PyGithub/commits/4aadfff21cdd2d2566b0e4bd7309c233b5f4ae23","sha":"4aadfff21cdd2d2566b0e4bd7309c233b5f4ae23"}],"commit":{"author":{"email":"vincent@vincent-jacques.net","name":"Vincent Jacques","date":"2012-05-27T00:37:17-07:00"},"url":"https://api.github.com/repos/jacquev6/PyGithub/git/commits/93dcae5cf207de376c91d0599226e7c7563e1d16","message":"Remove branch coverage for optional attributes (temporary?)","committer":{"email":"vincent@vincent-jacques.net","name":"Vincent Jacques","date":"2012-05-27T00:37:17-07:00"},"tree":{"url":"https://api.github.com/repos/jacquev6/PyGithub/git/trees/d925a951cd6a5442e91dcfded3171520e9cca5de","sha":"d925a951cd6a5442e91dcfded3171520e9cca5de"}}},{"author":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"url":"https://api.github.com/repos/jacquev6/PyGithub/commits/8a4f306d4b223682dd19410d4a9150636ebe4206","committer":{"url":"https://api.github.com/users/jacquev6","avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"sha":"8a4f306d4b223682dd19410d4a9150636ebe4206","parents":[{"url":"https://api.github.com/repos/jacquev6/PyGithub/commits/93dcae5cf207de376c91d0599226e7c7563e1d16","sha":"93dcae5cf207de376c91d0599226e7c7563e1d16"}],"commit":{"author":{"email":"vincent@vincent-jacques.net","name":"Vincent Jacques","date":"2012-05-27T02:07:47-07:00"},"url":"https://api.github.com/repos/jacquev6/PyGithub/git/commits/8a4f306d4b223682dd19410d4a9150636ebe4206","message":"Test (and implement) Issue.*_label*\n\nAnd this commit will be used to test PullRequests","committer":{"email":"vincent@vincent-jacques.net","name":"Vincent Jacques","date":"2012-05-27T02:07:47-07:00"},"tree":{"url":"https://api.github.com/repos/jacquev6/PyGithub/git/trees/fa0251344d6b0b9f69f33c1faf6e3323001b309d","sha":"fa0251344d6b0b9f69f33c1faf6e3323001b309d"}}}] - diff --git a/github/tests/ReplayData/PullRequestReview.setUp.txt b/github/tests/ReplayData/PullRequestReview.setUp.txt index 732633c1..05196c05 100644 --- a/github/tests/ReplayData/PullRequestReview.setUp.txt +++ b/github/tests/ReplayData/PullRequestReview.setUp.txt @@ -6,8 +6,30 @@ None {'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} None 200 -[('content-length', '14726'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-served-by', 'edf23fdc48375d9066b698b8d98062e9'), ('x-oauth-scopes', 'gist, repo, user'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('x-accepted-oauth-scopes', ''), ('etag', '"f375b2b7b6eb9081788c5e3b1dedba0e"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('status', '200 OK'), ('x-ratelimit-remaining', '4907'), ('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', 'C1FF:69EB:25C778B:2F12119:58D55E89'), ('last-modified', 'Wed, 22 Mar 2017 19:07:28 GMT'), ('date', 'Fri, 24 Mar 2017 17:59:37 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')] -{"url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538","id":111649703,"html_url":"https://github.com/PyGithub/PyGithub/pull/538","diff_url":"https://github.com/PyGithub/PyGithub/pull/538.diff","patch_url":"https://github.com/PyGithub/PyGithub/pull/538.patch","issue_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/538","number":538,"state":"open","locked":false,"title":"Add Support for Pull Request Reviews feature","user":{"login":"allevin","id":13543471,"avatar_url":"https://avatars1.githubusercontent.com/u/13543471?v=3","gravatar_id":"","url":"https://api.github.com/users/allevin","html_url":"https://github.com/allevin","followers_url":"https://api.github.com/users/allevin/followers","following_url":"https://api.github.com/users/allevin/following{/other_user}","gists_url":"https://api.github.com/users/allevin/gists{/gist_id}","starred_url":"https://api.github.com/users/allevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allevin/subscriptions","organizations_url":"https://api.github.com/users/allevin/orgs","repos_url":"https://api.github.com/users/allevin/repos","events_url":"https://api.github.com/users/allevin/events{/privacy}","received_events_url":"https://api.github.com/users/allevin/received_events","type":"User","site_admin":false},"body":"Adding support to Pull Request class to access new Github API features [Pull Request reviews](https://developer.github.com/v3/pulls/reviews/) and [Pull Request Reviewer Requests](https://developer.github.com/v3/pulls/review_requests/)\r\n\r\nThe API's is still in beta. \r\n\r\nI approached this by providing a minimal set of routines to access the list of reviews or a specific review. Also access to get a list of Reviewer requests. \r\n\r\nBecause the API is still early in Beta, I choose not to implement the create/delete/edit features, but the infrastructure should be in place for future improvements.\r\n\r\n","created_at":"2017-03-20T21:00:37Z","updated_at":"2017-03-22T19:07:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"764e59cb251dc0e9aab5be993d4451b35f91b685","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538/commits","review_comments_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538/comments","review_comment_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/538/comments","statuses_url":"https://api.github.com/repos/PyGithub/PyGithub/statuses/7a0fcb27b7cd6c346fc3f76216ccb6e0f4ca3bcc","head":{"label":"allevin:Add_Pull_Request_Reviews_Feature","ref":"Add_Pull_Request_Reviews_Feature","sha":"7a0fcb27b7cd6c346fc3f76216ccb6e0f4ca3bcc","user":{"login":"allevin","id":13543471,"avatar_url":"https://avatars1.githubusercontent.com/u/13543471?v=3","gravatar_id":"","url":"https://api.github.com/users/allevin","html_url":"https://github.com/allevin","followers_url":"https://api.github.com/users/allevin/followers","following_url":"https://api.github.com/users/allevin/following{/other_user}","gists_url":"https://api.github.com/users/allevin/gists{/gist_id}","starred_url":"https://api.github.com/users/allevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allevin/subscriptions","organizations_url":"https://api.github.com/users/allevin/orgs","repos_url":"https://api.github.com/users/allevin/repos","events_url":"https://api.github.com/users/allevin/events{/privacy}","received_events_url":"https://api.github.com/users/allevin/received_events","type":"User","site_admin":false},"repo":{"id":85619926,"name":"PyGithub","full_name":"allevin/PyGithub","owner":{"login":"allevin","id":13543471,"avatar_url":"https://avatars1.githubusercontent.com/u/13543471?v=3","gravatar_id":"","url":"https://api.github.com/users/allevin","html_url":"https://github.com/allevin","followers_url":"https://api.github.com/users/allevin/followers","following_url":"https://api.github.com/users/allevin/following{/other_user}","gists_url":"https://api.github.com/users/allevin/gists{/gist_id}","starred_url":"https://api.github.com/users/allevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allevin/subscriptions","organizations_url":"https://api.github.com/users/allevin/orgs","repos_url":"https://api.github.com/users/allevin/repos","events_url":"https://api.github.com/users/allevin/events{/privacy}","received_events_url":"https://api.github.com/users/allevin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/allevin/PyGithub","description":"Typed interactions with the GitHub API v3","fork":true,"url":"https://api.github.com/repos/allevin/PyGithub","forks_url":"https://api.github.com/repos/allevin/PyGithub/forks","keys_url":"https://api.github.com/repos/allevin/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/allevin/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/allevin/PyGithub/teams","hooks_url":"https://api.github.com/repos/allevin/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/allevin/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/allevin/PyGithub/events","assignees_url":"https://api.github.com/repos/allevin/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/allevin/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/allevin/PyGithub/tags","blobs_url":"https://api.github.com/repos/allevin/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/allevin/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/allevin/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/allevin/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/allevin/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/allevin/PyGithub/languages","stargazers_url":"https://api.github.com/repos/allevin/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/allevin/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/allevin/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/allevin/PyGithub/subscription","commits_url":"https://api.github.com/repos/allevin/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/allevin/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/allevin/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/allevin/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/allevin/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/allevin/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/allevin/PyGithub/merges","archive_url":"https://api.github.com/repos/allevin/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/allevin/PyGithub/downloads","issues_url":"https://api.github.com/repos/allevin/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/allevin/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/allevin/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/allevin/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/allevin/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/allevin/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/allevin/PyGithub/deployments","created_at":"2017-03-20T19:55:57Z","updated_at":"2017-03-20T19:56:01Z","pushed_at":"2017-03-23T18:08:52Z","git_url":"git://github.com/allevin/PyGithub.git","ssh_url":"git@github.com:allevin/PyGithub.git","clone_url":"https://github.com/allevin/PyGithub.git","svn_url":"https://github.com/allevin/PyGithub","homepage":"","size":12131,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"PyGithub:master","ref":"master","sha":"414f6e648f4da87f10bae7d01948a63dc82b80f8","user":{"login":"PyGithub","id":11288996,"avatar_url":"https://avatars3.githubusercontent.com/u/11288996?v=3","gravatar_id":"","url":"https://api.github.com/users/PyGithub","html_url":"https://github.com/PyGithub","followers_url":"https://api.github.com/users/PyGithub/followers","following_url":"https://api.github.com/users/PyGithub/following{/other_user}","gists_url":"https://api.github.com/users/PyGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGithub/subscriptions","organizations_url":"https://api.github.com/users/PyGithub/orgs","repos_url":"https://api.github.com/users/PyGithub/repos","events_url":"https://api.github.com/users/PyGithub/events{/privacy}","received_events_url":"https://api.github.com/users/PyGithub/received_events","type":"Organization","site_admin":false},"repo":{"id":3544490,"name":"PyGithub","full_name":"PyGithub/PyGithub","owner":{"login":"PyGithub","id":11288996,"avatar_url":"https://avatars3.githubusercontent.com/u/11288996?v=3","gravatar_id":"","url":"https://api.github.com/users/PyGithub","html_url":"https://github.com/PyGithub","followers_url":"https://api.github.com/users/PyGithub/followers","following_url":"https://api.github.com/users/PyGithub/following{/other_user}","gists_url":"https://api.github.com/users/PyGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGithub/subscriptions","organizations_url":"https://api.github.com/users/PyGithub/orgs","repos_url":"https://api.github.com/users/PyGithub/repos","events_url":"https://api.github.com/users/PyGithub/events{/privacy}","received_events_url":"https://api.github.com/users/PyGithub/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PyGithub/PyGithub","description":"Typed interactions with the GitHub API v3","fork":false,"url":"https://api.github.com/repos/PyGithub/PyGithub","forks_url":"https://api.github.com/repos/PyGithub/PyGithub/forks","keys_url":"https://api.github.com/repos/PyGithub/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PyGithub/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PyGithub/PyGithub/teams","hooks_url":"https://api.github.com/repos/PyGithub/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/PyGithub/PyGithub/events","assignees_url":"https://api.github.com/repos/PyGithub/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/PyGithub/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/PyGithub/PyGithub/tags","blobs_url":"https://api.github.com/repos/PyGithub/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PyGithub/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PyGithub/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/PyGithub/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PyGithub/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/PyGithub/PyGithub/languages","stargazers_url":"https://api.github.com/repos/PyGithub/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/PyGithub/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/PyGithub/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/PyGithub/PyGithub/subscription","commits_url":"https://api.github.com/repos/PyGithub/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/PyGithub/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/PyGithub/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/PyGithub/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/PyGithub/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PyGithub/PyGithub/merges","archive_url":"https://api.github.com/repos/PyGithub/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PyGithub/PyGithub/downloads","issues_url":"https://api.github.com/repos/PyGithub/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/PyGithub/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/PyGithub/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PyGithub/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/PyGithub/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/PyGithub/PyGithub/deployments","created_at":"2012-02-25T12:53:47Z","updated_at":"2017-03-22T13:29:26Z","pushed_at":"2017-03-21T19:00:19Z","git_url":"git://github.com/PyGithub/PyGithub.git","ssh_url":"git@github.com:PyGithub/PyGithub.git","clone_url":"https://github.com/PyGithub/PyGithub.git","svn_url":"https://github.com/PyGithub/PyGithub","homepage":"","size":12133,"stargazers_count":1221,"watchers_count":1221,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":403,"mirror_url":null,"open_issues_count":124,"forks":403,"open_issues":124,"watchers":1221,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538"},"html":{"href":"https://github.com/PyGithub/PyGithub/pull/538"},"issue":{"href":"https://api.github.com/repos/PyGithub/PyGithub/issues/538"},"comments":{"href":"https://api.github.com/repos/PyGithub/PyGithub/issues/538/comments"},"review_comments":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538/comments"},"review_comment":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538/commits"},"statuses":{"href":"https://api.github.com/repos/PyGithub/PyGithub/statuses/7a0fcb27b7cd6c346fc3f76216ccb6e0f4ca3bcc"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":3,"review_comments":0,"maintainer_can_modify":true,"commits":3,"additions":329,"deletions":0,"changed_files":6} +[('content-length', '16870'), ('x-runtime-rack', '0.166874'), ('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', '"180a414bcab1173c542017fc5a03d2d6"'), ('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', '4551'), ('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', 'DDDA:9B6E:FB5A9F:127A623:5AB118CF'), ('last-modified', 'Tue, 20 Mar 2018 14:15:45 GMT'), ('date', 'Tue, 20 Mar 2018 14:21:04 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')] +{"url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538","id":111649703,"html_url":"https://github.com/PyGithub/PyGithub/pull/538","diff_url":"https://github.com/PyGithub/PyGithub/pull/538.diff","patch_url":"https://github.com/PyGithub/PyGithub/pull/538.patch","issue_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/538","number":538,"state":"closed","locked":false,"title":"Add Support for Pull Request Reviews feature","user":{"login":"allevin","id":13543471,"avatar_url":"https://avatars2.githubusercontent.com/u/13543471?v=4","gravatar_id":"","url":"https://api.github.com/users/allevin","html_url":"https://github.com/allevin","followers_url":"https://api.github.com/users/allevin/followers","following_url":"https://api.github.com/users/allevin/following{/other_user}","gists_url":"https://api.github.com/users/allevin/gists{/gist_id}","starred_url":"https://api.github.com/users/allevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allevin/subscriptions","organizations_url":"https://api.github.com/users/allevin/orgs","repos_url":"https://api.github.com/users/allevin/repos","events_url":"https://api.github.com/users/allevin/events{/privacy}","received_events_url":"https://api.github.com/users/allevin/received_events","type":"User","site_admin":false},"body":"Adding support to Pull Request class to access new Github API features [Pull Request reviews](https://developer.github.com/v3/pulls/reviews/) and [Pull Request Reviewer Requests](https://developer.github.com/v3/pulls/review_requests/)\r\n\r\nThe API's is still in beta. \r\n\r\nI approached this by providing a minimal set of routines to access the list of reviews or a specific review. Also access to get a list of Reviewer requests. \r\n\r\nBecause the API is still early in Beta, I choose not to implement the create/delete/edit features, but the infrastructure should be in place for future improvements.\r\n\r\n","created_at":"2017-03-20T21:00:37Z","updated_at":"2018-03-20T14:15:45Z","closed_at":"2017-03-25T16:52:49Z","merged_at":"2017-03-25T16:52:49Z","merge_commit_sha":"2525515b094d7425f7018eb5b66171e21c5fbc10","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jayfk","id":2930472,"avatar_url":"https://avatars2.githubusercontent.com/u/2930472?v=4","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}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538/commits","review_comments_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538/comments","review_comment_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/538/comments","statuses_url":"https://api.github.com/repos/PyGithub/PyGithub/statuses/b6b127d732586df5dcf0444df73621f240ca4bb2","head":{"label":"allevin:Add_Pull_Request_Reviews_Feature","ref":"Add_Pull_Request_Reviews_Feature","sha":"b6b127d732586df5dcf0444df73621f240ca4bb2","user":{"login":"allevin","id":13543471,"avatar_url":"https://avatars2.githubusercontent.com/u/13543471?v=4","gravatar_id":"","url":"https://api.github.com/users/allevin","html_url":"https://github.com/allevin","followers_url":"https://api.github.com/users/allevin/followers","following_url":"https://api.github.com/users/allevin/following{/other_user}","gists_url":"https://api.github.com/users/allevin/gists{/gist_id}","starred_url":"https://api.github.com/users/allevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allevin/subscriptions","organizations_url":"https://api.github.com/users/allevin/orgs","repos_url":"https://api.github.com/users/allevin/repos","events_url":"https://api.github.com/users/allevin/events{/privacy}","received_events_url":"https://api.github.com/users/allevin/received_events","type":"User","site_admin":false},"repo":{"id":85619926,"name":"PyGithub","full_name":"allevin/PyGithub","owner":{"login":"allevin","id":13543471,"avatar_url":"https://avatars2.githubusercontent.com/u/13543471?v=4","gravatar_id":"","url":"https://api.github.com/users/allevin","html_url":"https://github.com/allevin","followers_url":"https://api.github.com/users/allevin/followers","following_url":"https://api.github.com/users/allevin/following{/other_user}","gists_url":"https://api.github.com/users/allevin/gists{/gist_id}","starred_url":"https://api.github.com/users/allevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allevin/subscriptions","organizations_url":"https://api.github.com/users/allevin/orgs","repos_url":"https://api.github.com/users/allevin/repos","events_url":"https://api.github.com/users/allevin/events{/privacy}","received_events_url":"https://api.github.com/users/allevin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/allevin/PyGithub","description":"Typed interactions with the GitHub API v3","fork":true,"url":"https://api.github.com/repos/allevin/PyGithub","forks_url":"https://api.github.com/repos/allevin/PyGithub/forks","keys_url":"https://api.github.com/repos/allevin/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/allevin/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/allevin/PyGithub/teams","hooks_url":"https://api.github.com/repos/allevin/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/allevin/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/allevin/PyGithub/events","assignees_url":"https://api.github.com/repos/allevin/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/allevin/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/allevin/PyGithub/tags","blobs_url":"https://api.github.com/repos/allevin/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/allevin/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/allevin/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/allevin/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/allevin/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/allevin/PyGithub/languages","stargazers_url":"https://api.github.com/repos/allevin/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/allevin/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/allevin/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/allevin/PyGithub/subscription","commits_url":"https://api.github.com/repos/allevin/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/allevin/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/allevin/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/allevin/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/allevin/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/allevin/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/allevin/PyGithub/merges","archive_url":"https://api.github.com/repos/allevin/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/allevin/PyGithub/downloads","issues_url":"https://api.github.com/repos/allevin/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/allevin/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/allevin/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/allevin/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/allevin/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/allevin/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/allevin/PyGithub/deployments","created_at":"2017-03-20T19:55:57Z","updated_at":"2017-03-20T19:56:01Z","pushed_at":"2017-03-24T20:45:25Z","git_url":"git://github.com/allevin/PyGithub.git","ssh_url":"git@github.com:allevin/PyGithub.git","clone_url":"https://github.com/allevin/PyGithub.git","svn_url":"https://github.com/allevin/PyGithub","homepage":"","size":12144,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"PyGithub:master","ref":"master","sha":"414f6e648f4da87f10bae7d01948a63dc82b80f8","user":{"login":"PyGithub","id":11288996,"avatar_url":"https://avatars0.githubusercontent.com/u/11288996?v=4","gravatar_id":"","url":"https://api.github.com/users/PyGithub","html_url":"https://github.com/PyGithub","followers_url":"https://api.github.com/users/PyGithub/followers","following_url":"https://api.github.com/users/PyGithub/following{/other_user}","gists_url":"https://api.github.com/users/PyGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGithub/subscriptions","organizations_url":"https://api.github.com/users/PyGithub/orgs","repos_url":"https://api.github.com/users/PyGithub/repos","events_url":"https://api.github.com/users/PyGithub/events{/privacy}","received_events_url":"https://api.github.com/users/PyGithub/received_events","type":"Organization","site_admin":false},"repo":{"id":3544490,"name":"PyGithub","full_name":"PyGithub/PyGithub","owner":{"login":"PyGithub","id":11288996,"avatar_url":"https://avatars0.githubusercontent.com/u/11288996?v=4","gravatar_id":"","url":"https://api.github.com/users/PyGithub","html_url":"https://github.com/PyGithub","followers_url":"https://api.github.com/users/PyGithub/followers","following_url":"https://api.github.com/users/PyGithub/following{/other_user}","gists_url":"https://api.github.com/users/PyGithub/gists{/gist_id}","starred_url":"https://api.github.com/users/PyGithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyGithub/subscriptions","organizations_url":"https://api.github.com/users/PyGithub/orgs","repos_url":"https://api.github.com/users/PyGithub/repos","events_url":"https://api.github.com/users/PyGithub/events{/privacy}","received_events_url":"https://api.github.com/users/PyGithub/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PyGithub/PyGithub","description":"Typed interactions with the GitHub API v3","fork":false,"url":"https://api.github.com/repos/PyGithub/PyGithub","forks_url":"https://api.github.com/repos/PyGithub/PyGithub/forks","keys_url":"https://api.github.com/repos/PyGithub/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PyGithub/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PyGithub/PyGithub/teams","hooks_url":"https://api.github.com/repos/PyGithub/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/PyGithub/PyGithub/events","assignees_url":"https://api.github.com/repos/PyGithub/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/PyGithub/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/PyGithub/PyGithub/tags","blobs_url":"https://api.github.com/repos/PyGithub/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PyGithub/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PyGithub/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/PyGithub/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PyGithub/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/PyGithub/PyGithub/languages","stargazers_url":"https://api.github.com/repos/PyGithub/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/PyGithub/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/PyGithub/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/PyGithub/PyGithub/subscription","commits_url":"https://api.github.com/repos/PyGithub/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/PyGithub/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/PyGithub/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/PyGithub/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/PyGithub/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/PyGithub/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PyGithub/PyGithub/merges","archive_url":"https://api.github.com/repos/PyGithub/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PyGithub/PyGithub/downloads","issues_url":"https://api.github.com/repos/PyGithub/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/PyGithub/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/PyGithub/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/PyGithub/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PyGithub/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/PyGithub/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/PyGithub/PyGithub/deployments","created_at":"2012-02-25T12:53:47Z","updated_at":"2018-03-20T12:27:47Z","pushed_at":"2018-03-20T12:27:44Z","git_url":"git://github.com/PyGithub/PyGithub.git","ssh_url":"git@github.com:PyGithub/PyGithub.git","clone_url":"https://github.com/PyGithub/PyGithub.git","svn_url":"https://github.com/PyGithub/PyGithub","homepage":"http://pygithub.readthedocs.io/","size":10905,"stargazers_count":1719,"watchers_count":1719,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":590,"mirror_url":null,"archived":false,"open_issues_count":188,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":590,"open_issues":188,"watchers":1719,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538"},"html":{"href":"https://github.com/PyGithub/PyGithub/pull/538"},"issue":{"href":"https://api.github.com/repos/PyGithub/PyGithub/issues/538"},"comments":{"href":"https://api.github.com/repos/PyGithub/PyGithub/issues/538/comments"},"review_comments":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538/comments"},"review_comment":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PyGithub/PyGithub/pulls/538/commits"},"statuses":{"href":"https://api.github.com/repos/PyGithub/PyGithub/statuses/b6b127d732586df5dcf0444df73621f240ca4bb2"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"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},"comments":6,"review_comments":0,"maintainer_can_modify":false,"commits":4,"additions":372,"deletions":0,"changed_files":8} + +https +GET +api.github.com +None +/repos/PyGithub/PyGithub/commits/2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('content-length', '15949'), ('x-runtime-rack', '0.069736'), ('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', '"061259c90f2c55f8497d7de36f6a1ba9"'), ('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', '4549'), ('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', 'DDDB:9B6E:FB5B95:127A740:5AB118D1'), ('last-modified', 'Mon, 20 Mar 2017 20:44:26 GMT'), ('date', 'Tue, 20 Mar 2018 14:21:05 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')] +{"sha":"2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52","commit":{"author":{"name":"Aaron Levine","email":"allevin@sandia.gov","date":"2017-03-20T20:44:26Z"},"committer":{"name":"Aaron Levine","email":"allevin@sandia.gov","date":"2017-03-20T20:44:26Z"},"message":"Add Support for Pull Request Reviews feature","tree":{"sha":"d6bdfe97f73bc45f7a9bc3606f62a6f7122669c9","url":"https://api.github.com/repos/PyGithub/PyGithub/git/trees/d6bdfe97f73bc45f7a9bc3606f62a6f7122669c9"},"url":"https://api.github.com/repos/PyGithub/PyGithub/git/commits/2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52","comment_count":0,"verification":{"verified":false,"reason":"unsigned","signature":null,"payload":null}},"url":"https://api.github.com/repos/PyGithub/PyGithub/commits/2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52","html_url":"https://github.com/PyGithub/PyGithub/commit/2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52","comments_url":"https://api.github.com/repos/PyGithub/PyGithub/commits/2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52/comments","author":{"login":"allevin","id":13543471,"avatar_url":"https://avatars2.githubusercontent.com/u/13543471?v=4","gravatar_id":"","url":"https://api.github.com/users/allevin","html_url":"https://github.com/allevin","followers_url":"https://api.github.com/users/allevin/followers","following_url":"https://api.github.com/users/allevin/following{/other_user}","gists_url":"https://api.github.com/users/allevin/gists{/gist_id}","starred_url":"https://api.github.com/users/allevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allevin/subscriptions","organizations_url":"https://api.github.com/users/allevin/orgs","repos_url":"https://api.github.com/users/allevin/repos","events_url":"https://api.github.com/users/allevin/events{/privacy}","received_events_url":"https://api.github.com/users/allevin/received_events","type":"User","site_admin":false},"committer":{"login":"allevin","id":13543471,"avatar_url":"https://avatars2.githubusercontent.com/u/13543471?v=4","gravatar_id":"","url":"https://api.github.com/users/allevin","html_url":"https://github.com/allevin","followers_url":"https://api.github.com/users/allevin/followers","following_url":"https://api.github.com/users/allevin/following{/other_user}","gists_url":"https://api.github.com/users/allevin/gists{/gist_id}","starred_url":"https://api.github.com/users/allevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allevin/subscriptions","organizations_url":"https://api.github.com/users/allevin/orgs","repos_url":"https://api.github.com/users/allevin/repos","events_url":"https://api.github.com/users/allevin/events{/privacy}","received_events_url":"https://api.github.com/users/allevin/received_events","type":"User","site_admin":false},"parents":[{"sha":"414f6e648f4da87f10bae7d01948a63dc82b80f8","url":"https://api.github.com/repos/PyGithub/PyGithub/commits/414f6e648f4da87f10bae7d01948a63dc82b80f8","html_url":"https://github.com/PyGithub/PyGithub/commit/414f6e648f4da87f10bae7d01948a63dc82b80f8"}],"stats":{"total":231,"additions":231,"deletions":0},"files":[{"sha":"e051573885e484959370e8ac8a122a568d0c4439","filename":"github/PullRequest.py","status":"modified","additions":42,"deletions":0,"changes":42,"blob_url":"https://github.com/PyGithub/PyGithub/blob/2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52/github/PullRequest.py","raw_url":"https://github.com/PyGithub/PyGithub/raw/2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52/github/PullRequest.py","contents_url":"https://api.github.com/repos/PyGithub/PyGithub/contents/github/PullRequest.py?ref=2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52","patch":"@@ -37,6 +37,8 @@\n import github.File\n import github.IssueComment\n import github.Commit\n+import github.PullRequestReview\n+import github.PullRequestReviewerRequests\n \n \n class PullRequest(github.GithubObject.CompletableGithubObject):\n@@ -495,6 +497,46 @@ def get_issue_comments(self):\n None\n )\n \n+ def get_review(self, id):\n+ \"\"\"\n+ :calls: `GET /repos/:owner/:repo/pulls/:number/reviews/:id `_\n+ :param id: integer\n+ :rtype: :class:`github.PullRequestReview.PullRequestReview`\n+ \"\"\"\n+ assert isinstance(id, (int, long)), id\n+ headers, data = self._requester.requestJsonAndCheck(\n+ \"GET\",\n+ self.url + \"/reviews/\" + str(id),\n+ headers={'Accept': 'application/vnd.github.black-cat-preview+json'}\n+ )\n+ return github.PullRequestReview.PullRequestReview(self._requester, headers, data, completed=True)\n+\n+ def get_reviews(self):\n+ \"\"\"\n+ :calls: `GET /repos/:owner/:repo/pulls/:number/reviews `_\n+ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestReview.PullRequestReview`\n+ \"\"\"\n+ return github.PaginatedList.PaginatedList(\n+ github.PullRequestReview.PullRequestReview,\n+ self._requester,\n+ self.url + \"/reviews\",\n+ None,\n+ headers={'Accept': 'application/vnd.github.black-cat-preview+json'}\n+ )\n+\n+ def get_review_requests(self):\n+ \"\"\"\n+ :calls: `GET /repos/:owner/:repo/pulls/:number/requested_reviewers `_\n+ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.InspectionReviewers.InspectionReviewers`\n+ \"\"\"\n+ return github.PaginatedList.PaginatedList(\n+ github.PullRequestReviewerRequests.PullRequestReviewerRequests,\n+ self._requester,\n+ self.url + \"/requested_reviewers\",\n+ None,\n+ headers={'Accept': 'application/vnd.github.black-cat-preview+json'}\n+ )\n+ \n def is_merged(self):\n \"\"\"\n :calls: `GET /repos/:owner/:repo/pulls/:number/merge `_"},{"sha":"1c2189ee830731e17e596d8d6702972e6226e207","filename":"github/PullRequestReview.py","status":"added","additions":121,"deletions":0,"changes":121,"blob_url":"https://github.com/PyGithub/PyGithub/blob/2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52/github/PullRequestReview.py","raw_url":"https://github.com/PyGithub/PyGithub/raw/2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52/github/PullRequestReview.py","contents_url":"https://api.github.com/repos/PyGithub/PyGithub/contents/github/PullRequestReview.py?ref=2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52","patch":"@@ -0,0 +1,121 @@\n+# -*- coding: utf-8 -*-\n+\n+# ########################## Copyrights and license ############################\n+# #\n+# Copyright 2012 Vincent Jacques #\n+# Copyright 2012 Zearin #\n+# Copyright 2013 AKFish #\n+# Copyright 2013 Michael Stead #\n+# Copyright 2013 Vincent Jacques #\n+# #\n+# This file is part of PyGithub. #\n+# http://pygithub.github.io/PyGithub/v1/index.html #\n+# #\n+# PyGithub is free software: you can redistribute it and/or modify it under #\n+# the terms of the GNU Lesser General Public License as published by the Free #\n+# Software Foundation, either version 3 of the License, or (at your option) #\n+# any later version. #\n+# #\n+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #\n+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #\n+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #\n+# details. #\n+# #\n+# You should have received a copy of the GNU Lesser General Public License #\n+# along with PyGithub. If not, see . #\n+# #\n+# ##############################################################################\n+\n+import github.GithubObject\n+\n+import github.NamedUser\n+\n+\n+class PullRequestReview(github.GithubObject.CompletableGithubObject):\n+ \"\"\"\n+ This class represents Pull Request Reviews as returned for example by https://developer.github.com/v3/pulls/reviews/\n+ \"\"\"\n+\n+ def __repr__(self):\n+ return self.get__repr__({\"id\": self._id.value, \"user\": self._user.value})\n+\n+ @property\n+ def id(self):\n+ \"\"\"\n+ :type: integer\n+ \"\"\"\n+ self._completeIfNotSet(self._id)\n+ return self._id.value\n+\n+ @property\n+ def user(self):\n+ \"\"\"\n+ :type: :class:`github.NamedUser.NamedUser`\n+ \"\"\"\n+ self._completeIfNotSet(self._user)\n+ return self._user.value\n+\n+ @property\n+ def body(self):\n+ \"\"\"\n+ :type: string\n+ \"\"\"\n+ self._completeIfNotSet(self._body)\n+ return self._body.value\n+\n+ @property\n+ def commit_id(self):\n+ \"\"\"\n+ :type: string\n+ \"\"\"\n+ self._completeIfNotSet(self._commit_id)\n+ return self._commit_id.value\n+\n+ @property\n+ def state(self):\n+ \"\"\"\n+ :type: string\n+ \"\"\"\n+ self._completeIfNotSet(self._state)\n+ return self._state.value\n+\n+ @property\n+ def html_url(self):\n+ \"\"\"\n+ :type: string\n+ \"\"\"\n+ self._completeIfNotSet(self._html_url)\n+ return self._html_url.value\n+\n+ @property\n+ def pull_request_url(self):\n+ \"\"\"\n+ :type: string\n+ \"\"\"\n+ self._completeIfNotSet(self._pull_request_url)\n+ return self._pull_request_url.value\n+\n+ def _initAttributes(self):\n+ self._id = github.GithubObject.NotSet\n+ self._user = github.GithubObject.NotSet\n+ self._body = github.GithubObject.NotSet\n+ self._commit_id = github.GithubObject.NotSet\n+ self._state = github.GithubObject.NotSet\n+ self._html_url = github.GithubObject.NotSet\n+ self._pull_request_url = github.GithubObject.NotSet\n+\n+ def _useAttributes(self, attributes):\n+ if \"id\" in attributes: # pragma no branch\n+ self._id = self._makeIntAttribute(attributes[\"id\"])\n+ if \"user\" in attributes: # pragma no branch\n+ self._user = self._makeClassAttribute(github.NamedUser.NamedUser, attributes[\"user\"])\n+ if \"body\" in attributes: # pragma no branch\n+ self._body = self._makeStringAttribute(attributes[\"body\"])\n+ if \"commit_id\" in attributes: # pragma no branch\n+ self._commit_id = self._makeStringAttribute(attributes[\"commit_id\"])\n+ if \"state\" in attributes: # pragma no branch\n+ self._state = self._makeStringAttribute(attributes[\"state\"])\n+ if \"html_url\" in attributes: # pragma no branch\n+ self._html_url = self._makeStringAttribute(attributes[\"html_url\"])\n+ if \"pull_request_url\" in attributes: # pragma no branch\n+ self._pull_request_url = self._makeStringAttribute(attributes[\"pull_request_url\"])"},{"sha":"8daf5753a10c9703b174d964e39863cf518ed5f4","filename":"github/PullRequestReviewerRequests.py","status":"added","additions":68,"deletions":0,"changes":68,"blob_url":"https://github.com/PyGithub/PyGithub/blob/2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52/github/PullRequestReviewerRequests.py","raw_url":"https://github.com/PyGithub/PyGithub/raw/2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52/github/PullRequestReviewerRequests.py","contents_url":"https://api.github.com/repos/PyGithub/PyGithub/contents/github/PullRequestReviewerRequests.py?ref=2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52","patch":"@@ -0,0 +1,68 @@\n+# -*- coding: utf-8 -*-\n+\n+# ########################## Copyrights and license ############################\n+# #\n+# Copyright 2012 Vincent Jacques #\n+# Copyright 2012 Zearin #\n+# Copyright 2013 AKFish #\n+# Copyright 2013 Michael Stead #\n+# Copyright 2013 Vincent Jacques #\n+# #\n+# This file is part of PyGithub. #\n+# http://pygithub.github.io/PyGithub/v1/index.html #\n+# #\n+# PyGithub is free software: you can redistribute it and/or modify it under #\n+# the terms of the GNU Lesser General Public License as published by the Free #\n+# Software Foundation, either version 3 of the License, or (at your option) #\n+# any later version. #\n+# #\n+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #\n+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #\n+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #\n+# details. #\n+# #\n+# You should have received a copy of the GNU Lesser General Public License #\n+# along with PyGithub. If not, see . #\n+# #\n+# ##############################################################################\n+\n+import github.GithubObject\n+\n+import github.NamedUser\n+\n+\n+class PullRequestReviewerRequests(github.GithubObject.CompletableGithubObject):\n+ \"\"\"\n+ This class represents Pull Request Reviewer Requests as returned for example by https://developer.github.com/v3/pulls/review_requests/\n+ \"\"\"\n+\n+ def __repr__(self):\n+ return self.get__repr__({\"id\": self._id.value, \"login\": self._login.value})\n+\n+ @property\n+ def login(self):\n+ \"\"\"\n+ :type: string\n+ \"\"\"\n+ self._completeIfNotSet(self._login)\n+ return self._login.value\n+\n+ @property\n+ def id(self):\n+ \"\"\"\n+ :type: integer\n+ \"\"\"\n+ self._completeIfNotSet(self._id)\n+ return self._id.value\n+\n+ def _initAttributes(self):\n+ self._login = github.GithubObject.NotSet\n+ self._id = github.GithubObject.NotSet\n+# self._url = github.GithubObject.NotSet\n+# self._html_url = github.GithubObject.NotSet\n+\n+ def _useAttributes(self, attributes):\n+ if \"login\" in attributes: # pragma no branch\n+ self._login = self._makeStringAttribute(attributes[\"login\"])\n+ if \"id\" in attributes: # pragma no branch\n+ self._id = self._makeIntAttribute(attributes[\"id\"])"}]} + +https +POST +api.github.com +None +/repos/PyGithub/PyGithub/pulls/538/reviews +{'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +{"commit_id": "2f0e4e55fe87e38d26efc9aa1346f56abfbd6c52", "body": "Some review created by PyGithub", "event": "COMMENT", "comments": []} +200 +[('content-length', '1396'), ('x-runtime-rack', '0.272465'), ('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', '"a49b6e67f0f63b026494e1e690811725"'), ('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', '4547'), ('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', 'DDDC:9B6A:527B69:62442F:5AB118D2'), ('date', 'Tue, 20 Mar 2018 14:21:07 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":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"} https GET @@ -17,6 +39,6 @@ None {'Authorization': 'Basic login_and_password_removed', 'Accept': 'application/vnd.github.black-cat-preview+json', 'User-Agent': 'PyGithub/Python'} None 200 -[('content-length', '1389'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-served-by', 'cee4c0729c8e9147e7abcb45b9d69689'), ('x-oauth-scopes', 'gist, repo, user'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('x-accepted-oauth-scopes', ''), ('etag', '"ddc104addccab409de06f166dd96db83"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('status', '200 OK'), ('x-ratelimit-remaining', '4906'), ('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', 'C200:69E5:1A3022C:207D2E3:58D55E8A'), ('date', 'Fri, 24 Mar 2017 17:59:38 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')] -{"id":28482091,"user":{"login":"jzelinskie","id":343539,"avatar_url":"https://avatars0.githubusercontent.com/u/343539?v=3","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","_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"} +[('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')] +{"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 new file mode 100644 index 00000000..41cbd421 --- /dev/null +++ b/github/tests/ReplayData/PullRequestReview.testAttributes.txt @@ -0,0 +1,11 @@ +https +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'} +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')] +[{"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"}] +