From 6bf2acc74df5c1ac5bac099c7e778045ab1fd4db Mon Sep 17 00:00:00 2001 From: Shinichi TAMURA Date: Mon, 26 Mar 2018 11:25:45 +0900 Subject: [PATCH] Added Issue.as_pull_request() and PullReqest.as_issue() (#630) --- github/Issue.py | 11 +++++ github/PullRequest.py | 11 +++++ github/tests/AllTests.py | 1 + github/tests/Issue572.py | 47 +++++++++++++++++++ github/tests/ReplayData/Issue572.setUp.txt | 22 +++++++++ .../Issue572.testIssueAsPullRequest.txt | 22 +++++++++ .../Issue572.testPullReqeustAsIssue.txt | 22 +++++++++ 7 files changed, 136 insertions(+) create mode 100644 github/tests/Issue572.py create mode 100644 github/tests/ReplayData/Issue572.setUp.txt create mode 100644 github/tests/ReplayData/Issue572.testIssueAsPullRequest.txt create mode 100644 github/tests/ReplayData/Issue572.testPullReqeustAsIssue.txt diff --git a/github/Issue.py b/github/Issue.py index 77a62883..5cd476c8 100644 --- a/github/Issue.py +++ b/github/Issue.py @@ -242,6 +242,17 @@ class Issue(github.GithubObject.CompletableGithubObject): self._completeIfNotSet(self._user) return self._user.value + def as_pull_request(self): + """ + :calls: `GET /repos/:owner/:repo/pulls/:number `_ + :rtype: :class:`github.PullRequest.PullRequest` + """ + headers, data = self._requester.requestJsonAndCheck( + "GET", + "/pulls/".join(self.url.rsplit("/issues/", 1)) + ) + return github.PullRequest.PullRequest(self._requester, headers, data, completed=True) + def add_to_assignees(self, *assignees): """ :calls: `POST /repos/:owner/:repo/issues/:number/assignees `_ diff --git a/github/PullRequest.py b/github/PullRequest.py index 115df6be..9b3dc7e6 100644 --- a/github/PullRequest.py +++ b/github/PullRequest.py @@ -338,6 +338,17 @@ class PullRequest(github.GithubObject.CompletableGithubObject): self._completeIfNotSet(self._user) return self._user.value + def as_issue(self): + """ + :calls: `GET /repos/:owner/:repo/issues/:number `_ + :rtype: :class:`github.Issue.Issue` + """ + headers, data = self._requester.requestJsonAndCheck( + "GET", + "/issues/".join(self.url.rsplit("/pulls/", 1)) + ) + return github.Issue.Issue(self._requester, headers, data, completed=True) + def create_comment(self, body, commit_id, path, position): """ :calls: `POST /repos/:owner/:repo/pulls/:number/comments `_ diff --git a/github/tests/AllTests.py b/github/tests/AllTests.py index 279dddbb..5c52b96c 100644 --- a/github/tests/AllTests.py +++ b/github/tests/AllTests.py @@ -109,3 +109,4 @@ from Issue214 import * from Issue216 import * from Issue278 import * from Issue494 import * +from Issue572 import * diff --git a/github/tests/Issue572.py b/github/tests/Issue572.py new file mode 100644 index 00000000..1d319206 --- /dev/null +++ b/github/tests/Issue572.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- + +# ########################## Copyrights and license ############################ +# # +# Copyright 2012 Vincent Jacques # +# Copyright 2012 Zearin # +# Copyright 2013 Stuart Glaser # +# Copyright 2013 Vincent Jacques # +# # +# This file is part of PyGithub. # +# http://pygithub.github.io/PyGithub/v1/index.html # +# # +# PyGithub is free software: you can redistribute it and/or modify it under # +# the terms of the GNU Lesser General Public License as published by the Free # +# Software Foundation, either version 3 of the License, or (at your option) # +# any later version. # +# # +# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # +# details. # +# # +# You should have received a copy of the GNU Lesser General Public License # +# along with PyGithub. If not, see . # +# # +# ############################################################################## + +import Framework + +import github + +class Issue572(Framework.TestCase): + def setUp(self): + Framework.TestCase.setUp(self) + self.repo = self.g.get_user().get_repo("PyGithub") + + def testIssueAsPullRequest(self): + issue = self.repo.get_issue(2) + pull = issue.as_pull_request() + self.assertEqual(issue.html_url, pull.html_url) + self.assertTrue(isinstance(pull, github.PullRequest.PullRequest)) + + def testPullReqeustAsIssue(self): + pull = self.repo.get_pull(2) + issue = pull.as_issue() + self.assertEqual(pull.html_url, issue.html_url) + self.assertTrue(isinstance(issue, github.Issue.Issue)) diff --git a/github/tests/ReplayData/Issue572.setUp.txt b/github/tests/ReplayData/Issue572.setUp.txt new file mode 100644 index 00000000..52fec834 --- /dev/null +++ b/github/tests/ReplayData/Issue572.setUp.txt @@ -0,0 +1,22 @@ +https +GET +api.github.com +None +/user +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +null +200 +[('content-length', '1292'), ('x-runtime-rack', '0.070649'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('etag', '"e95976f937b96c73935deac0a82c8733"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('status', '200 OK'), ('x-ratelimit-remaining', '4971'), ('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', 'E5DB:15E9B:473480:5D147D:59BFD788'), ('last-modified', 'Fri, 08 Sep 2017 16:01:32 GMT'), ('date', 'Mon, 18 Sep 2017 14:26:17 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', '1505747208')] +{"login":"tmshn","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/tmshn","html_url":"https://github.com/tmshn","followers_url":"https://api.github.com/users/tmshn/followers","following_url":"https://api.github.com/users/tmshn/following{/other_user}","gists_url":"https://api.github.com/users/tmshn/gists{/gist_id}","starred_url":"https://api.github.com/users/tmshn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmshn/subscriptions","organizations_url":"https://api.github.com/users/tmshn/orgs","repos_url":"https://api.github.com/users/tmshn/repos","events_url":"https://api.github.com/users/tmshn/events{/privacy}","received_events_url":"https://api.github.com/users/tmshn/received_events","type":"User","site_admin":false,"name":"Shinichi TAMURA","company":null,"blog":"","location":"Japan","email":null,"hireable":null,"bio":null,"public_repos":11,"public_gists":1,"followers":4,"following":0,"created_at":"2013-03-04T04:54:58Z","updated_at":"2017-09-08T16:01:32Z","private_gists":0,"total_private_repos":0,"owned_private_repos":0,"disk_usage":18,"collaborators":0,"two_factor_authentication":false,"plan":{"name":"free","space":976562499,"collaborators":0,"private_repos":0}} + +https +GET +api.github.com +None +/repos/tmshn/PyGithub +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +null +200 +[('content-length', '13966'), ('x-runtime-rack', '0.088780'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('etag', '"0bfab9985eecbedd95fcca8a177c448b"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('status', '200 OK'), ('x-ratelimit-remaining', '4970'), ('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', 'E5DC:15E9C:1DD158:26DEC2:59BFD789'), ('last-modified', 'Sun, 27 Nov 2016 13:31:42 GMT'), ('date', 'Mon, 18 Sep 2017 14:26:18 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', '1505747208')] +{"id":70329851,"name":"PyGithub","full_name":"tmshn/PyGithub","owner":{"login":"tmshn","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/tmshn","html_url":"https://github.com/tmshn","followers_url":"https://api.github.com/users/tmshn/followers","following_url":"https://api.github.com/users/tmshn/following{/other_user}","gists_url":"https://api.github.com/users/tmshn/gists{/gist_id}","starred_url":"https://api.github.com/users/tmshn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmshn/subscriptions","organizations_url":"https://api.github.com/users/tmshn/orgs","repos_url":"https://api.github.com/users/tmshn/repos","events_url":"https://api.github.com/users/tmshn/events{/privacy}","received_events_url":"https://api.github.com/users/tmshn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tmshn/PyGithub","description":"Typed interactions with the GitHub API v3","fork":true,"url":"https://api.github.com/repos/tmshn/PyGithub","forks_url":"https://api.github.com/repos/tmshn/PyGithub/forks","keys_url":"https://api.github.com/repos/tmshn/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmshn/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmshn/PyGithub/teams","hooks_url":"https://api.github.com/repos/tmshn/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/tmshn/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/tmshn/PyGithub/events","assignees_url":"https://api.github.com/repos/tmshn/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/tmshn/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/tmshn/PyGithub/tags","blobs_url":"https://api.github.com/repos/tmshn/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmshn/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmshn/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmshn/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmshn/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/tmshn/PyGithub/languages","stargazers_url":"https://api.github.com/repos/tmshn/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/tmshn/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/tmshn/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/tmshn/PyGithub/subscription","commits_url":"https://api.github.com/repos/tmshn/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmshn/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmshn/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmshn/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmshn/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/tmshn/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmshn/PyGithub/merges","archive_url":"https://api.github.com/repos/tmshn/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmshn/PyGithub/downloads","issues_url":"https://api.github.com/repos/tmshn/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/tmshn/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/tmshn/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/tmshn/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmshn/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/tmshn/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/tmshn/PyGithub/deployments","created_at":"2016-10-08T12:30:45Z","updated_at":"2016-11-27T13:31:42Z","pushed_at":"2017-09-18T14:24:41Z","git_url":"git://github.com/tmshn/PyGithub.git","ssh_url":"git@github.com:tmshn/PyGithub.git","clone_url":"https://github.com/tmshn/PyGithub.git","svn_url":"https://github.com/tmshn/PyGithub","homepage":"http://pygithub.readthedocs.io/en/stable/","size":12187,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"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","permissions":{"admin":true,"push":true,"pull":true},"allow_squash_merge":true,"allow_merge_commit":true,"allow_rebase_merge":true,"parent":{"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":"2017-09-18T05:44:02Z","pushed_at":"2017-09-18T14:22:09Z","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":12152,"stargazers_count":1430,"watchers_count":1430,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":498,"mirror_url":null,"open_issues_count":196,"forks":498,"open_issues":196,"watchers":1430,"default_branch":"master"},"source":{"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":"2017-09-18T05:44:02Z","pushed_at":"2017-09-18T14:22:09Z","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":12152,"stargazers_count":1430,"watchers_count":1430,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":498,"mirror_url":null,"open_issues_count":196,"forks":498,"open_issues":196,"watchers":1430,"default_branch":"master"},"network_count":498,"subscribers_count":1} + diff --git a/github/tests/ReplayData/Issue572.testIssueAsPullRequest.txt b/github/tests/ReplayData/Issue572.testIssueAsPullRequest.txt new file mode 100644 index 00000000..798d3006 --- /dev/null +++ b/github/tests/ReplayData/Issue572.testIssueAsPullRequest.txt @@ -0,0 +1,22 @@ +https +GET +api.github.com +None +/repos/tmshn/PyGithub/issues/2 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +null +200 +[('content-length', '1930'), ('x-runtime-rack', '0.093117'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('etag', '"ae937c52e48359e25263e774150f5b9e"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('status', '200 OK'), ('x-ratelimit-remaining', '4973'), ('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', 'E5D9:15E9B:4733D1:5D139F:59BFD786'), ('last-modified', 'Mon, 18 Sep 2017 14:25:14 GMT'), ('date', 'Mon, 18 Sep 2017 14:26:15 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', '1505747208')] +{"url":"https://api.github.com/repos/tmshn/PyGithub/issues/2","repository_url":"https://api.github.com/repos/tmshn/PyGithub","labels_url":"https://api.github.com/repos/tmshn/PyGithub/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/tmshn/PyGithub/issues/2/comments","events_url":"https://api.github.com/repos/tmshn/PyGithub/issues/2/events","html_url":"https://github.com/tmshn/PyGithub/pull/2","id":258498982,"number":2,"title":"[PR for TEST] Issue to pull","user":{"login":"tmshn","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/tmshn","html_url":"https://github.com/tmshn","followers_url":"https://api.github.com/users/tmshn/followers","following_url":"https://api.github.com/users/tmshn/following{/other_user}","gists_url":"https://api.github.com/users/tmshn/gists{/gist_id}","starred_url":"https://api.github.com/users/tmshn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmshn/subscriptions","organizations_url":"https://api.github.com/users/tmshn/orgs","repos_url":"https://api.github.com/users/tmshn/repos","events_url":"https://api.github.com/users/tmshn/events{/privacy}","received_events_url":"https://api.github.com/users/tmshn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-18T14:24:05Z","updated_at":"2017-09-18T14:25:14Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/tmshn/PyGithub/pulls/2","html_url":"https://github.com/tmshn/PyGithub/pull/2","diff_url":"https://github.com/tmshn/PyGithub/pull/2.diff","patch_url":"https://github.com/tmshn/PyGithub/pull/2.patch"},"body":"This pr is created to used for automated acctest.\r\nAfter I recorded the replay data, this will be closed.","closed_by":null} + +https +GET +api.github.com +None +/repos/tmshn/PyGithub/pulls/2 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +null +200 +[('content-length', '13858'), ('x-runtime-rack', '0.364592'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('etag', '"c734b968529b43c1dafb7f9d20e0c8e8"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('status', '200 OK'), ('x-ratelimit-remaining', '4972'), ('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', 'E5DA:15E9B:47340D:5D13E9:59BFD787'), ('last-modified', 'Mon, 18 Sep 2017 14:25:14 GMT'), ('date', 'Mon, 18 Sep 2017 14:26:16 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', '1505747208')] +{"url":"https://api.github.com/repos/tmshn/PyGithub/pulls/2","id":141616402,"html_url":"https://github.com/tmshn/PyGithub/pull/2","diff_url":"https://github.com/tmshn/PyGithub/pull/2.diff","patch_url":"https://github.com/tmshn/PyGithub/pull/2.patch","issue_url":"https://api.github.com/repos/tmshn/PyGithub/issues/2","number":2,"state":"open","locked":false,"title":"[PR for TEST] Issue to pull","user":{"login":"tmshn","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/tmshn","html_url":"https://github.com/tmshn","followers_url":"https://api.github.com/users/tmshn/followers","following_url":"https://api.github.com/users/tmshn/following{/other_user}","gists_url":"https://api.github.com/users/tmshn/gists{/gist_id}","starred_url":"https://api.github.com/users/tmshn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmshn/subscriptions","organizations_url":"https://api.github.com/users/tmshn/orgs","repos_url":"https://api.github.com/users/tmshn/repos","events_url":"https://api.github.com/users/tmshn/events{/privacy}","received_events_url":"https://api.github.com/users/tmshn/received_events","type":"User","site_admin":false},"body":"This pr is created to used for automated acctest.\r\nAfter I recorded the replay data, this will be closed.","created_at":"2017-09-18T14:24:05Z","updated_at":"2017-09-18T14:25:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ac60d06a42e248d0ce681070ff323edaeac47d2","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/tmshn/PyGithub/pulls/2/commits","review_comments_url":"https://api.github.com/repos/tmshn/PyGithub/pulls/2/comments","review_comment_url":"https://api.github.com/repos/tmshn/PyGithub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tmshn/PyGithub/issues/2/comments","statuses_url":"https://api.github.com/repos/tmshn/PyGithub/statuses/2f1b3257b402d6b82033fde766a5394f4e980c04","head":{"label":"tmshn:issue-to-pull","ref":"issue-to-pull","sha":"2f1b3257b402d6b82033fde766a5394f4e980c04","user":{"login":"tmshn","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/tmshn","html_url":"https://github.com/tmshn","followers_url":"https://api.github.com/users/tmshn/followers","following_url":"https://api.github.com/users/tmshn/following{/other_user}","gists_url":"https://api.github.com/users/tmshn/gists{/gist_id}","starred_url":"https://api.github.com/users/tmshn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmshn/subscriptions","organizations_url":"https://api.github.com/users/tmshn/orgs","repos_url":"https://api.github.com/users/tmshn/repos","events_url":"https://api.github.com/users/tmshn/events{/privacy}","received_events_url":"https://api.github.com/users/tmshn/received_events","type":"User","site_admin":false},"repo":{"id":70329851,"name":"PyGithub","full_name":"tmshn/PyGithub","owner":{"login":"tmshn","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/tmshn","html_url":"https://github.com/tmshn","followers_url":"https://api.github.com/users/tmshn/followers","following_url":"https://api.github.com/users/tmshn/following{/other_user}","gists_url":"https://api.github.com/users/tmshn/gists{/gist_id}","starred_url":"https://api.github.com/users/tmshn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmshn/subscriptions","organizations_url":"https://api.github.com/users/tmshn/orgs","repos_url":"https://api.github.com/users/tmshn/repos","events_url":"https://api.github.com/users/tmshn/events{/privacy}","received_events_url":"https://api.github.com/users/tmshn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tmshn/PyGithub","description":"Typed interactions with the GitHub API v3","fork":true,"url":"https://api.github.com/repos/tmshn/PyGithub","forks_url":"https://api.github.com/repos/tmshn/PyGithub/forks","keys_url":"https://api.github.com/repos/tmshn/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmshn/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmshn/PyGithub/teams","hooks_url":"https://api.github.com/repos/tmshn/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/tmshn/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/tmshn/PyGithub/events","assignees_url":"https://api.github.com/repos/tmshn/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/tmshn/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/tmshn/PyGithub/tags","blobs_url":"https://api.github.com/repos/tmshn/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmshn/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmshn/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmshn/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmshn/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/tmshn/PyGithub/languages","stargazers_url":"https://api.github.com/repos/tmshn/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/tmshn/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/tmshn/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/tmshn/PyGithub/subscription","commits_url":"https://api.github.com/repos/tmshn/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmshn/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmshn/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmshn/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmshn/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/tmshn/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmshn/PyGithub/merges","archive_url":"https://api.github.com/repos/tmshn/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmshn/PyGithub/downloads","issues_url":"https://api.github.com/repos/tmshn/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/tmshn/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/tmshn/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/tmshn/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmshn/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/tmshn/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/tmshn/PyGithub/deployments","created_at":"2016-10-08T12:30:45Z","updated_at":"2016-11-27T13:31:42Z","pushed_at":"2017-09-18T14:24:41Z","git_url":"git://github.com/tmshn/PyGithub.git","ssh_url":"git@github.com:tmshn/PyGithub.git","clone_url":"https://github.com/tmshn/PyGithub.git","svn_url":"https://github.com/tmshn/PyGithub","homepage":"http://pygithub.readthedocs.io/en/stable/","size":12187,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"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":"tmshn:master","ref":"master","sha":"3437a7030f02a1648290db581621936eb5771b69","user":{"login":"tmshn","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/tmshn","html_url":"https://github.com/tmshn","followers_url":"https://api.github.com/users/tmshn/followers","following_url":"https://api.github.com/users/tmshn/following{/other_user}","gists_url":"https://api.github.com/users/tmshn/gists{/gist_id}","starred_url":"https://api.github.com/users/tmshn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmshn/subscriptions","organizations_url":"https://api.github.com/users/tmshn/orgs","repos_url":"https://api.github.com/users/tmshn/repos","events_url":"https://api.github.com/users/tmshn/events{/privacy}","received_events_url":"https://api.github.com/users/tmshn/received_events","type":"User","site_admin":false},"repo":{"id":70329851,"name":"PyGithub","full_name":"tmshn/PyGithub","owner":{"login":"tmshn","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/tmshn","html_url":"https://github.com/tmshn","followers_url":"https://api.github.com/users/tmshn/followers","following_url":"https://api.github.com/users/tmshn/following{/other_user}","gists_url":"https://api.github.com/users/tmshn/gists{/gist_id}","starred_url":"https://api.github.com/users/tmshn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmshn/subscriptions","organizations_url":"https://api.github.com/users/tmshn/orgs","repos_url":"https://api.github.com/users/tmshn/repos","events_url":"https://api.github.com/users/tmshn/events{/privacy}","received_events_url":"https://api.github.com/users/tmshn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tmshn/PyGithub","description":"Typed interactions with the GitHub API v3","fork":true,"url":"https://api.github.com/repos/tmshn/PyGithub","forks_url":"https://api.github.com/repos/tmshn/PyGithub/forks","keys_url":"https://api.github.com/repos/tmshn/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmshn/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmshn/PyGithub/teams","hooks_url":"https://api.github.com/repos/tmshn/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/tmshn/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/tmshn/PyGithub/events","assignees_url":"https://api.github.com/repos/tmshn/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/tmshn/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/tmshn/PyGithub/tags","blobs_url":"https://api.github.com/repos/tmshn/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmshn/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmshn/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmshn/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmshn/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/tmshn/PyGithub/languages","stargazers_url":"https://api.github.com/repos/tmshn/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/tmshn/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/tmshn/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/tmshn/PyGithub/subscription","commits_url":"https://api.github.com/repos/tmshn/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmshn/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmshn/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmshn/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmshn/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/tmshn/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmshn/PyGithub/merges","archive_url":"https://api.github.com/repos/tmshn/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmshn/PyGithub/downloads","issues_url":"https://api.github.com/repos/tmshn/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/tmshn/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/tmshn/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/tmshn/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmshn/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/tmshn/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/tmshn/PyGithub/deployments","created_at":"2016-10-08T12:30:45Z","updated_at":"2016-11-27T13:31:42Z","pushed_at":"2017-09-18T14:24:41Z","git_url":"git://github.com/tmshn/PyGithub.git","ssh_url":"git@github.com:tmshn/PyGithub.git","clone_url":"https://github.com/tmshn/PyGithub.git","svn_url":"https://github.com/tmshn/PyGithub","homepage":"http://pygithub.readthedocs.io/en/stable/","size":12187,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"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"}},"_links":{"self":{"href":"https://api.github.com/repos/tmshn/PyGithub/pulls/2"},"html":{"href":"https://github.com/tmshn/PyGithub/pull/2"},"issue":{"href":"https://api.github.com/repos/tmshn/PyGithub/issues/2"},"comments":{"href":"https://api.github.com/repos/tmshn/PyGithub/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/tmshn/PyGithub/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/tmshn/PyGithub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tmshn/PyGithub/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/tmshn/PyGithub/statuses/2f1b3257b402d6b82033fde766a5394f4e980c04"}},"author_association":"OWNER","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":22,"deletions":0,"changed_files":2} + diff --git a/github/tests/ReplayData/Issue572.testPullReqeustAsIssue.txt b/github/tests/ReplayData/Issue572.testPullReqeustAsIssue.txt new file mode 100644 index 00000000..ffbfdf3c --- /dev/null +++ b/github/tests/ReplayData/Issue572.testPullReqeustAsIssue.txt @@ -0,0 +1,22 @@ +https +GET +api.github.com +None +/repos/tmshn/PyGithub/pulls/2 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +null +200 +[('content-length', '13858'), ('x-runtime-rack', '0.117462'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('etag', '"c734b968529b43c1dafb7f9d20e0c8e8"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('status', '200 OK'), ('x-ratelimit-remaining', '4969'), ('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', 'E5DD:15E9B:473500:5D1524:59BFD78A'), ('last-modified', 'Mon, 18 Sep 2017 14:25:14 GMT'), ('date', 'Mon, 18 Sep 2017 14:26:19 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', '1505747208')] +{"url":"https://api.github.com/repos/tmshn/PyGithub/pulls/2","id":141616402,"html_url":"https://github.com/tmshn/PyGithub/pull/2","diff_url":"https://github.com/tmshn/PyGithub/pull/2.diff","patch_url":"https://github.com/tmshn/PyGithub/pull/2.patch","issue_url":"https://api.github.com/repos/tmshn/PyGithub/issues/2","number":2,"state":"open","locked":false,"title":"[PR for TEST] Issue to pull","user":{"login":"tmshn","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/tmshn","html_url":"https://github.com/tmshn","followers_url":"https://api.github.com/users/tmshn/followers","following_url":"https://api.github.com/users/tmshn/following{/other_user}","gists_url":"https://api.github.com/users/tmshn/gists{/gist_id}","starred_url":"https://api.github.com/users/tmshn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmshn/subscriptions","organizations_url":"https://api.github.com/users/tmshn/orgs","repos_url":"https://api.github.com/users/tmshn/repos","events_url":"https://api.github.com/users/tmshn/events{/privacy}","received_events_url":"https://api.github.com/users/tmshn/received_events","type":"User","site_admin":false},"body":"This pr is created to used for automated acctest.\r\nAfter I recorded the replay data, this will be closed.","created_at":"2017-09-18T14:24:05Z","updated_at":"2017-09-18T14:25:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ac60d06a42e248d0ce681070ff323edaeac47d2","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/tmshn/PyGithub/pulls/2/commits","review_comments_url":"https://api.github.com/repos/tmshn/PyGithub/pulls/2/comments","review_comment_url":"https://api.github.com/repos/tmshn/PyGithub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tmshn/PyGithub/issues/2/comments","statuses_url":"https://api.github.com/repos/tmshn/PyGithub/statuses/2f1b3257b402d6b82033fde766a5394f4e980c04","head":{"label":"tmshn:issue-to-pull","ref":"issue-to-pull","sha":"2f1b3257b402d6b82033fde766a5394f4e980c04","user":{"login":"tmshn","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/tmshn","html_url":"https://github.com/tmshn","followers_url":"https://api.github.com/users/tmshn/followers","following_url":"https://api.github.com/users/tmshn/following{/other_user}","gists_url":"https://api.github.com/users/tmshn/gists{/gist_id}","starred_url":"https://api.github.com/users/tmshn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmshn/subscriptions","organizations_url":"https://api.github.com/users/tmshn/orgs","repos_url":"https://api.github.com/users/tmshn/repos","events_url":"https://api.github.com/users/tmshn/events{/privacy}","received_events_url":"https://api.github.com/users/tmshn/received_events","type":"User","site_admin":false},"repo":{"id":70329851,"name":"PyGithub","full_name":"tmshn/PyGithub","owner":{"login":"tmshn","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/tmshn","html_url":"https://github.com/tmshn","followers_url":"https://api.github.com/users/tmshn/followers","following_url":"https://api.github.com/users/tmshn/following{/other_user}","gists_url":"https://api.github.com/users/tmshn/gists{/gist_id}","starred_url":"https://api.github.com/users/tmshn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmshn/subscriptions","organizations_url":"https://api.github.com/users/tmshn/orgs","repos_url":"https://api.github.com/users/tmshn/repos","events_url":"https://api.github.com/users/tmshn/events{/privacy}","received_events_url":"https://api.github.com/users/tmshn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tmshn/PyGithub","description":"Typed interactions with the GitHub API v3","fork":true,"url":"https://api.github.com/repos/tmshn/PyGithub","forks_url":"https://api.github.com/repos/tmshn/PyGithub/forks","keys_url":"https://api.github.com/repos/tmshn/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmshn/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmshn/PyGithub/teams","hooks_url":"https://api.github.com/repos/tmshn/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/tmshn/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/tmshn/PyGithub/events","assignees_url":"https://api.github.com/repos/tmshn/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/tmshn/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/tmshn/PyGithub/tags","blobs_url":"https://api.github.com/repos/tmshn/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmshn/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmshn/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmshn/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmshn/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/tmshn/PyGithub/languages","stargazers_url":"https://api.github.com/repos/tmshn/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/tmshn/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/tmshn/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/tmshn/PyGithub/subscription","commits_url":"https://api.github.com/repos/tmshn/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmshn/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmshn/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmshn/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmshn/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/tmshn/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmshn/PyGithub/merges","archive_url":"https://api.github.com/repos/tmshn/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmshn/PyGithub/downloads","issues_url":"https://api.github.com/repos/tmshn/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/tmshn/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/tmshn/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/tmshn/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmshn/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/tmshn/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/tmshn/PyGithub/deployments","created_at":"2016-10-08T12:30:45Z","updated_at":"2016-11-27T13:31:42Z","pushed_at":"2017-09-18T14:24:41Z","git_url":"git://github.com/tmshn/PyGithub.git","ssh_url":"git@github.com:tmshn/PyGithub.git","clone_url":"https://github.com/tmshn/PyGithub.git","svn_url":"https://github.com/tmshn/PyGithub","homepage":"http://pygithub.readthedocs.io/en/stable/","size":12187,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"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":"tmshn:master","ref":"master","sha":"3437a7030f02a1648290db581621936eb5771b69","user":{"login":"tmshn","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/tmshn","html_url":"https://github.com/tmshn","followers_url":"https://api.github.com/users/tmshn/followers","following_url":"https://api.github.com/users/tmshn/following{/other_user}","gists_url":"https://api.github.com/users/tmshn/gists{/gist_id}","starred_url":"https://api.github.com/users/tmshn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmshn/subscriptions","organizations_url":"https://api.github.com/users/tmshn/orgs","repos_url":"https://api.github.com/users/tmshn/repos","events_url":"https://api.github.com/users/tmshn/events{/privacy}","received_events_url":"https://api.github.com/users/tmshn/received_events","type":"User","site_admin":false},"repo":{"id":70329851,"name":"PyGithub","full_name":"tmshn/PyGithub","owner":{"login":"tmshn","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/tmshn","html_url":"https://github.com/tmshn","followers_url":"https://api.github.com/users/tmshn/followers","following_url":"https://api.github.com/users/tmshn/following{/other_user}","gists_url":"https://api.github.com/users/tmshn/gists{/gist_id}","starred_url":"https://api.github.com/users/tmshn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmshn/subscriptions","organizations_url":"https://api.github.com/users/tmshn/orgs","repos_url":"https://api.github.com/users/tmshn/repos","events_url":"https://api.github.com/users/tmshn/events{/privacy}","received_events_url":"https://api.github.com/users/tmshn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tmshn/PyGithub","description":"Typed interactions with the GitHub API v3","fork":true,"url":"https://api.github.com/repos/tmshn/PyGithub","forks_url":"https://api.github.com/repos/tmshn/PyGithub/forks","keys_url":"https://api.github.com/repos/tmshn/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmshn/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmshn/PyGithub/teams","hooks_url":"https://api.github.com/repos/tmshn/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/tmshn/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/tmshn/PyGithub/events","assignees_url":"https://api.github.com/repos/tmshn/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/tmshn/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/tmshn/PyGithub/tags","blobs_url":"https://api.github.com/repos/tmshn/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmshn/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmshn/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmshn/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmshn/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/tmshn/PyGithub/languages","stargazers_url":"https://api.github.com/repos/tmshn/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/tmshn/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/tmshn/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/tmshn/PyGithub/subscription","commits_url":"https://api.github.com/repos/tmshn/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmshn/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmshn/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmshn/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmshn/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/tmshn/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmshn/PyGithub/merges","archive_url":"https://api.github.com/repos/tmshn/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmshn/PyGithub/downloads","issues_url":"https://api.github.com/repos/tmshn/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/tmshn/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/tmshn/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/tmshn/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmshn/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/tmshn/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/tmshn/PyGithub/deployments","created_at":"2016-10-08T12:30:45Z","updated_at":"2016-11-27T13:31:42Z","pushed_at":"2017-09-18T14:24:41Z","git_url":"git://github.com/tmshn/PyGithub.git","ssh_url":"git@github.com:tmshn/PyGithub.git","clone_url":"https://github.com/tmshn/PyGithub.git","svn_url":"https://github.com/tmshn/PyGithub","homepage":"http://pygithub.readthedocs.io/en/stable/","size":12187,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"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"}},"_links":{"self":{"href":"https://api.github.com/repos/tmshn/PyGithub/pulls/2"},"html":{"href":"https://github.com/tmshn/PyGithub/pull/2"},"issue":{"href":"https://api.github.com/repos/tmshn/PyGithub/issues/2"},"comments":{"href":"https://api.github.com/repos/tmshn/PyGithub/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/tmshn/PyGithub/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/tmshn/PyGithub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tmshn/PyGithub/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/tmshn/PyGithub/statuses/2f1b3257b402d6b82033fde766a5394f4e980c04"}},"author_association":"OWNER","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":22,"deletions":0,"changed_files":2} + +https +GET +api.github.com +None +/repos/tmshn/PyGithub/issues/2 +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +null +200 +[('content-length', '1930'), ('x-runtime-rack', '0.066580'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('etag', '"ae937c52e48359e25263e774150f5b9e"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('status', '200 OK'), ('x-ratelimit-remaining', '4968'), ('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', 'E5DE:15E9B:47354C:5D1581:59BFD78B'), ('last-modified', 'Mon, 18 Sep 2017 14:25:14 GMT'), ('date', 'Mon, 18 Sep 2017 14:26:20 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', '1505747208')] +{"url":"https://api.github.com/repos/tmshn/PyGithub/issues/2","repository_url":"https://api.github.com/repos/tmshn/PyGithub","labels_url":"https://api.github.com/repos/tmshn/PyGithub/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/tmshn/PyGithub/issues/2/comments","events_url":"https://api.github.com/repos/tmshn/PyGithub/issues/2/events","html_url":"https://github.com/tmshn/PyGithub/pull/2","id":258498982,"number":2,"title":"[PR for TEST] Issue to pull","user":{"login":"tmshn","id":3760893,"avatar_url":"https://avatars2.githubusercontent.com/u/3760893?v=4","gravatar_id":"","url":"https://api.github.com/users/tmshn","html_url":"https://github.com/tmshn","followers_url":"https://api.github.com/users/tmshn/followers","following_url":"https://api.github.com/users/tmshn/following{/other_user}","gists_url":"https://api.github.com/users/tmshn/gists{/gist_id}","starred_url":"https://api.github.com/users/tmshn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmshn/subscriptions","organizations_url":"https://api.github.com/users/tmshn/orgs","repos_url":"https://api.github.com/users/tmshn/repos","events_url":"https://api.github.com/users/tmshn/events{/privacy}","received_events_url":"https://api.github.com/users/tmshn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-18T14:24:05Z","updated_at":"2017-09-18T14:25:14Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/tmshn/PyGithub/pulls/2","html_url":"https://github.com/tmshn/PyGithub/pull/2","diff_url":"https://github.com/tmshn/PyGithub/pull/2.diff","patch_url":"https://github.com/tmshn/PyGithub/pull/2.patch"},"body":"This pr is created to used for automated acctest.\r\nAfter I recorded the replay data, this will be closed.","closed_by":null} +