From a163ba15626004ae5504699d89bf8a3d2641b590 Mon Sep 17 00:00:00 2001 From: Pavan Kunisetty Date: Tue, 22 Oct 2019 16:04:55 +0530 Subject: [PATCH] Add assignee removal/addition support to PRs (#1241) Add assignee removal/addition support to PRs Fixes #1109 Add test for new PR assignee functionality Add record file Addressed comments on #1016 --- github/PullRequest.py | 30 +++++++++++++++++ tests/PullRequest.py | 10 ++++++ tests/ReplayData/PullRequest.setUp.txt | 1 - .../PullRequest.testAddAndRemoveAssignees.txt | 32 +++++++++++++++++++ 4 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 tests/ReplayData/PullRequest.testAddAndRemoveAssignees.txt diff --git a/github/PullRequest.py b/github/PullRequest.py index fae5b337..9b13e3b7 100644 --- a/github/PullRequest.py +++ b/github/PullRequest.py @@ -794,6 +794,36 @@ class PullRequest(github.GithubObject.CompletableGithubObject): ) return github.PullRequestMergeStatus.PullRequestMergeStatus(self._requester, headers, data, completed=True) + def add_to_assignees(self, *assignees): + """ + :calls: `POST /repos/:owner/:repo/issues/:number/assignees `_ + :param assignees: list of :class:`github.NamedUser.NamedUser` or string + :rtype: None + """ + assert all(isinstance(element, (github.NamedUser.NamedUser, str)) for element in assignees), assignees + post_parameters = {"assignees": [assignee.login if isinstance(assignee, github.NamedUser.NamedUser) else assignee for assignee in assignees]} + headers, data = self._requester.requestJsonAndCheck( + "POST", + self.url + "/assignees", + input=post_parameters + ) + self._useAttributes(data) + + def remove_from_assignees(self, *assignees): + """ + :calls: `DELETE /repos/:owner/:repo/issues/:number/assignees `_ + :param assignees: list of :class:`github.NamedUser.NamedUser` or string + :rtype: None + """ + assert all(isinstance(element, (github.NamedUser.NamedUser, str)) for element in assignees), assignees + post_parameters = {"assignees": [assignee.login if isinstance(assignee, github.NamedUser.NamedUser) else assignee for assignee in assignees]} + headers, data = self._requester.requestJsonAndCheck( + "DELETE", + self.url + "/assignees", + input=post_parameters + ) + self._useAttributes(data) + def _initAttributes(self): self._additions = github.GithubObject.NotSet self._assignee = github.GithubObject.NotSet diff --git a/tests/PullRequest.py b/tests/PullRequest.py index 4559372c..48cecec5 100644 --- a/tests/PullRequest.py +++ b/tests/PullRequest.py @@ -218,3 +218,13 @@ class PullRequest(Framework.TestCase): def testMergeWithCommitMessage(self): self.g.get_user().get_repo("PyGithub").get_pull(39).merge("Custom commit message created by PyGithub") + + def testAddAndRemoveAssignees(self): + user1 = "jayfk" + user2 = self.g.get_user("jzelinskie") + self.assertListKeyEqual(self.pull.assignees, lambda a: a.login, ["stuglaser", "jacquev6"]) + self.pull.add_to_assignees(user1, user2) + self.assertListKeyEqual(self.pull.assignees, lambda a: a.login, + ["jacquev6", "stuglaser", "jayfk", "jzelinskie"]) + self.pull.remove_from_assignees(user1, user2) + self.assertListKeyEqual(self.pull.assignees, lambda a: a.login, ["jacquev6", "stuglaser"]) diff --git a/tests/ReplayData/PullRequest.setUp.txt b/tests/ReplayData/PullRequest.setUp.txt index e9088cde..5df38c8b 100644 --- a/tests/ReplayData/PullRequest.setUp.txt +++ b/tests/ReplayData/PullRequest.setUp.txt @@ -74,4 +74,3 @@ None 200 [('content-length', '14935'), ('x-runtime-rack', '0.162720'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP'), ('x-xss-protection', '1; mode=block'), ('x-content-type-options', 'nosniff'), ('etag', '"fc503f3238dd5064c8dbcaa4d3001745"'), ('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', '56'), ('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', 'D032:0794:1E3DF96:4B92E95:5B043D4A'), ('last-modified', 'Tue, 22 May 2018 15:09:34 GMT'), ('date', 'Tue, 22 May 2018 15:54:50 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', '60'), ('x-frame-options', 'deny'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1527008089')] {"url":"https://api.github.com/repos/MarcoFalke/PyGithub/pulls/4","id":189692578,"html_url":"https://github.com/MarcoFalke/PyGithub/pull/4","diff_url":"https://github.com/MarcoFalke/PyGithub/pull/4.diff","patch_url":"https://github.com/MarcoFalke/PyGithub/pull/4.patch","issue_url":"https://api.github.com/repos/MarcoFalke/PyGithub/issues/4","number":4,"state":"open","locked":false,"title":"uncached pull request","user":{"login":"MarcoFalke","id":6399679,"avatar_url":"https://avatars0.githubusercontent.com/u/6399679?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcoFalke","html_url":"https://github.com/MarcoFalke","followers_url":"https://api.github.com/users/MarcoFalke/followers","following_url":"https://api.github.com/users/MarcoFalke/following{/other_user}","gists_url":"https://api.github.com/users/MarcoFalke/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcoFalke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcoFalke/subscriptions","organizations_url":"https://api.github.com/users/MarcoFalke/orgs","repos_url":"https://api.github.com/users/MarcoFalke/repos","events_url":"https://api.github.com/users/MarcoFalke/events{/privacy}","received_events_url":"https://api.github.com/users/MarcoFalke/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-22T14:56:17Z","updated_at":"2018-05-22T15:09:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4b43ebefca88a93fb98b2165ec50c0ac5c6bcf1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/MarcoFalke/PyGithub/pulls/4/commits","review_comments_url":"https://api.github.com/repos/MarcoFalke/PyGithub/pulls/4/comments","review_comment_url":"https://api.github.com/repos/MarcoFalke/PyGithub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MarcoFalke/PyGithub/issues/4/comments","statuses_url":"https://api.github.com/repos/MarcoFalke/PyGithub/statuses/8ce24f41b47a2a02be86f21dd3af0435a7003318","head":{"label":"MarcoFalke:Mf1805-pull_uncached","ref":"Mf1805-pull_uncached","sha":"8ce24f41b47a2a02be86f21dd3af0435a7003318","user":{"login":"MarcoFalke","id":6399679,"avatar_url":"https://avatars0.githubusercontent.com/u/6399679?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcoFalke","html_url":"https://github.com/MarcoFalke","followers_url":"https://api.github.com/users/MarcoFalke/followers","following_url":"https://api.github.com/users/MarcoFalke/following{/other_user}","gists_url":"https://api.github.com/users/MarcoFalke/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcoFalke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcoFalke/subscriptions","organizations_url":"https://api.github.com/users/MarcoFalke/orgs","repos_url":"https://api.github.com/users/MarcoFalke/repos","events_url":"https://api.github.com/users/MarcoFalke/events{/privacy}","received_events_url":"https://api.github.com/users/MarcoFalke/received_events","type":"User","site_admin":false},"repo":{"id":134421800,"name":"PyGithub","full_name":"MarcoFalke/PyGithub","owner":{"login":"MarcoFalke","id":6399679,"avatar_url":"https://avatars0.githubusercontent.com/u/6399679?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcoFalke","html_url":"https://github.com/MarcoFalke","followers_url":"https://api.github.com/users/MarcoFalke/followers","following_url":"https://api.github.com/users/MarcoFalke/following{/other_user}","gists_url":"https://api.github.com/users/MarcoFalke/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcoFalke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcoFalke/subscriptions","organizations_url":"https://api.github.com/users/MarcoFalke/orgs","repos_url":"https://api.github.com/users/MarcoFalke/repos","events_url":"https://api.github.com/users/MarcoFalke/events{/privacy}","received_events_url":"https://api.github.com/users/MarcoFalke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MarcoFalke/PyGithub","description":"Typed interactions with the GitHub API v3","fork":true,"url":"https://api.github.com/repos/MarcoFalke/PyGithub","forks_url":"https://api.github.com/repos/MarcoFalke/PyGithub/forks","keys_url":"https://api.github.com/repos/MarcoFalke/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MarcoFalke/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MarcoFalke/PyGithub/teams","hooks_url":"https://api.github.com/repos/MarcoFalke/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/MarcoFalke/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/MarcoFalke/PyGithub/events","assignees_url":"https://api.github.com/repos/MarcoFalke/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/MarcoFalke/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/MarcoFalke/PyGithub/tags","blobs_url":"https://api.github.com/repos/MarcoFalke/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MarcoFalke/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MarcoFalke/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/MarcoFalke/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MarcoFalke/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/MarcoFalke/PyGithub/languages","stargazers_url":"https://api.github.com/repos/MarcoFalke/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/MarcoFalke/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/MarcoFalke/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/MarcoFalke/PyGithub/subscription","commits_url":"https://api.github.com/repos/MarcoFalke/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/MarcoFalke/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/MarcoFalke/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/MarcoFalke/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/MarcoFalke/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/MarcoFalke/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MarcoFalke/PyGithub/merges","archive_url":"https://api.github.com/repos/MarcoFalke/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MarcoFalke/PyGithub/downloads","issues_url":"https://api.github.com/repos/MarcoFalke/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/MarcoFalke/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/MarcoFalke/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/MarcoFalke/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MarcoFalke/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/MarcoFalke/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/MarcoFalke/PyGithub/deployments","created_at":"2018-05-22T13:46:45Z","updated_at":"2018-05-22T15:12:23Z","pushed_at":"2018-05-22T15:12:21Z","git_url":"git://github.com/MarcoFalke/PyGithub.git","ssh_url":"git@github.com:MarcoFalke/PyGithub.git","clone_url":"https://github.com/MarcoFalke/PyGithub.git","svn_url":"https://github.com/MarcoFalke/PyGithub","homepage":"http://pygithub.readthedocs.io/","size":11095,"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":2,"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":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"MarcoFalke:master","ref":"master","sha":"286272aaf1230cb9553a0ac57211492fec1d8e4c","user":{"login":"MarcoFalke","id":6399679,"avatar_url":"https://avatars0.githubusercontent.com/u/6399679?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcoFalke","html_url":"https://github.com/MarcoFalke","followers_url":"https://api.github.com/users/MarcoFalke/followers","following_url":"https://api.github.com/users/MarcoFalke/following{/other_user}","gists_url":"https://api.github.com/users/MarcoFalke/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcoFalke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcoFalke/subscriptions","organizations_url":"https://api.github.com/users/MarcoFalke/orgs","repos_url":"https://api.github.com/users/MarcoFalke/repos","events_url":"https://api.github.com/users/MarcoFalke/events{/privacy}","received_events_url":"https://api.github.com/users/MarcoFalke/received_events","type":"User","site_admin":false},"repo":{"id":134421800,"name":"PyGithub","full_name":"MarcoFalke/PyGithub","owner":{"login":"MarcoFalke","id":6399679,"avatar_url":"https://avatars0.githubusercontent.com/u/6399679?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcoFalke","html_url":"https://github.com/MarcoFalke","followers_url":"https://api.github.com/users/MarcoFalke/followers","following_url":"https://api.github.com/users/MarcoFalke/following{/other_user}","gists_url":"https://api.github.com/users/MarcoFalke/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcoFalke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcoFalke/subscriptions","organizations_url":"https://api.github.com/users/MarcoFalke/orgs","repos_url":"https://api.github.com/users/MarcoFalke/repos","events_url":"https://api.github.com/users/MarcoFalke/events{/privacy}","received_events_url":"https://api.github.com/users/MarcoFalke/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MarcoFalke/PyGithub","description":"Typed interactions with the GitHub API v3","fork":true,"url":"https://api.github.com/repos/MarcoFalke/PyGithub","forks_url":"https://api.github.com/repos/MarcoFalke/PyGithub/forks","keys_url":"https://api.github.com/repos/MarcoFalke/PyGithub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MarcoFalke/PyGithub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MarcoFalke/PyGithub/teams","hooks_url":"https://api.github.com/repos/MarcoFalke/PyGithub/hooks","issue_events_url":"https://api.github.com/repos/MarcoFalke/PyGithub/issues/events{/number}","events_url":"https://api.github.com/repos/MarcoFalke/PyGithub/events","assignees_url":"https://api.github.com/repos/MarcoFalke/PyGithub/assignees{/user}","branches_url":"https://api.github.com/repos/MarcoFalke/PyGithub/branches{/branch}","tags_url":"https://api.github.com/repos/MarcoFalke/PyGithub/tags","blobs_url":"https://api.github.com/repos/MarcoFalke/PyGithub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MarcoFalke/PyGithub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MarcoFalke/PyGithub/git/refs{/sha}","trees_url":"https://api.github.com/repos/MarcoFalke/PyGithub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MarcoFalke/PyGithub/statuses/{sha}","languages_url":"https://api.github.com/repos/MarcoFalke/PyGithub/languages","stargazers_url":"https://api.github.com/repos/MarcoFalke/PyGithub/stargazers","contributors_url":"https://api.github.com/repos/MarcoFalke/PyGithub/contributors","subscribers_url":"https://api.github.com/repos/MarcoFalke/PyGithub/subscribers","subscription_url":"https://api.github.com/repos/MarcoFalke/PyGithub/subscription","commits_url":"https://api.github.com/repos/MarcoFalke/PyGithub/commits{/sha}","git_commits_url":"https://api.github.com/repos/MarcoFalke/PyGithub/git/commits{/sha}","comments_url":"https://api.github.com/repos/MarcoFalke/PyGithub/comments{/number}","issue_comment_url":"https://api.github.com/repos/MarcoFalke/PyGithub/issues/comments{/number}","contents_url":"https://api.github.com/repos/MarcoFalke/PyGithub/contents/{+path}","compare_url":"https://api.github.com/repos/MarcoFalke/PyGithub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MarcoFalke/PyGithub/merges","archive_url":"https://api.github.com/repos/MarcoFalke/PyGithub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MarcoFalke/PyGithub/downloads","issues_url":"https://api.github.com/repos/MarcoFalke/PyGithub/issues{/number}","pulls_url":"https://api.github.com/repos/MarcoFalke/PyGithub/pulls{/number}","milestones_url":"https://api.github.com/repos/MarcoFalke/PyGithub/milestones{/number}","notifications_url":"https://api.github.com/repos/MarcoFalke/PyGithub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MarcoFalke/PyGithub/labels{/name}","releases_url":"https://api.github.com/repos/MarcoFalke/PyGithub/releases{/id}","deployments_url":"https://api.github.com/repos/MarcoFalke/PyGithub/deployments","created_at":"2018-05-22T13:46:45Z","updated_at":"2018-05-22T15:12:23Z","pushed_at":"2018-05-22T15:12:21Z","git_url":"git://github.com/MarcoFalke/PyGithub.git","ssh_url":"git@github.com:MarcoFalke/PyGithub.git","clone_url":"https://github.com/MarcoFalke/PyGithub.git","svn_url":"https://github.com/MarcoFalke/PyGithub","homepage":"http://pygithub.readthedocs.io/","size":11095,"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":2,"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":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MarcoFalke/PyGithub/pulls/4"},"html":{"href":"https://github.com/MarcoFalke/PyGithub/pull/4"},"issue":{"href":"https://api.github.com/repos/MarcoFalke/PyGithub/issues/4"},"comments":{"href":"https://api.github.com/repos/MarcoFalke/PyGithub/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/MarcoFalke/PyGithub/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/MarcoFalke/PyGithub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MarcoFalke/PyGithub/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/MarcoFalke/PyGithub/statuses/8ce24f41b47a2a02be86f21dd3af0435a7003318"}},"author_association":"OWNER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":2,"deletions":0,"changed_files":1} - diff --git a/tests/ReplayData/PullRequest.testAddAndRemoveAssignees.txt b/tests/ReplayData/PullRequest.testAddAndRemoveAssignees.txt new file mode 100644 index 00000000..672c9fb5 --- /dev/null +++ b/tests/ReplayData/PullRequest.testAddAndRemoveAssignees.txt @@ -0,0 +1,32 @@ +https +GET +api.github.com +None +/users/jzelinskie +{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +None +200 +[('status', '200 OK'), ('x-ratelimit-remaining', '4992'), ('content-length', '97'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"569c414d87e8ec43ec269a9e28bc2982"'), ('date', 'Sun, 27 May 2012 09:04:01 GMT'), ('content-type', 'application/json; charset=utf-8')] +{"login":"jzelinskie","id":343539,"node_id":"MDQ6VXNlcjM0MzUzOQ==","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,"name":"Jimmy Zelinskie","company":"Red Hat","blog":"https://jzelinskie.com","location":"Brooklyn, NY","email":null,"hireable":null,"bio":null,"public_repos":75,"public_gists":10,"followers":175,"following":18,"created_at":"2010-07-25T14:34:38Z","updated_at":"2019-09-16T15:33:05Z"} + +https +POST +api.github.com +None +/repos/jacquev6/PyGithub/pulls/31/assignees +{'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +{"assignees":["jayfk","jzelinskie"]} +201 +[('status', '200 OK'), ('x-ratelimit-remaining', '4985'), ('content-length', '335'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d135d74d2ea2159d044676a220d41d3a"'), ('date', 'Sun, 27 May 2012 09:04:06 GMT'), ('content-type', 'application/json; charset=utf-8')] +{"updated_at":"2012-05-26T14:59:33Z","body":"Body edited by PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub/pulls/31","comments":0,"milestone":{"creator":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"url":"https://api.github.com/repos/jacquev6/PyGithub/milestones/1","number":1,"title":"Version 0.4","due_on":"2012-03-13T07:00:00Z","open_issues":0,"created_at":"2012-03-08T12:22:10Z","state":"closed","description":"","id":93546,"closed_issues":3},"number":31,"closed_by":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"assignee":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"assignees":[{"login":"jacquev6","id": 327146,"avatar_url":"https://avatars.githubusercontent.com/u/327146?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquev6"},{"login":"stuglaser","id": 1527117,"avatar_url":"https://avatars.githubusercontent.com/u/1527117?v=3","gravatar_id":"","url":"https://api.github.com/users/stuglaser"},{"login":"jayfk","id": 2930472,"avatar_url":"https://avatars.githubusercontent.com/u/2930472?v=3","gravatar_id":"","url":"https://api.github.com/users/jayfk"},{"login":"jzelinskie","id": 343539,"avatar_url":"https://avatars.githubusercontent.com/u/343539?v=3","gravatar_id":"","url":"https://api.github.com/users/jzelinskie"}],"closed_at":"2012-05-26T14:59:33Z","title":"Issue created by PyGithub","labels":[{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Project+management","name":"Project management","color":"444444"},{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Question","name":"Question","color":"02e10c"}],"created_at":"2012-05-19T10:38:23Z","state":"closed","user":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"id":4653757,"pull_request":{"patch_url":null,"diff_url":null,"html_url":null},"html_url":"https://github.com/jacquev6/PyGithub/issues/31"} + +https +DELETE +api.github.com +None +/repos/jacquev6/PyGithub/pulls/31/assignees +{'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'} +{"assignees":["jayfk","jzelinskie"]} +200 +[('status', '200 OK'), ('x-ratelimit-remaining', '4985'), ('content-length', '335'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"d135d74d2ea2159d044676a220d41d3a"'), ('date', 'Sun, 27 May 2012 09:04:06 GMT'), ('content-type', 'application/json; charset=utf-8')] +{"updated_at":"2012-05-26T14:59:33Z","body":"Body edited by PyGithub","url":"https://api.github.com/repos/jacquev6/PyGithub/issues/31","comments":0,"milestone":{"creator":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"url":"https://api.github.com/repos/jacquev6/PyGithub/milestones/1","number":1,"title":"Version 0.4","due_on":"2012-03-13T07:00:00Z","open_issues":0,"created_at":"2012-03-08T12:22:10Z","state":"closed","description":"","id":93546,"closed_issues":3},"number":31,"closed_by":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"assignee":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"assignees":[{"login":"jacquev6","id": 327146,"avatar_url":"https://avatars.githubusercontent.com/u/327146?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquev6"},{"login":"stuglaser","id": 1527117,"avatar_url":"https://avatars.githubusercontent.com/u/1527117?v=3","gravatar_id":"","url":"https://api.github.com/users/stuglaser"}],"closed_at":"2012-05-26T14:59:33Z","title":"Issue created by PyGithub","labels":[{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Project+management","name":"Project management","color":"444444"},{"url":"https://api.github.com/repos/jacquev6/PyGithub/labels/Question","name":"Question","color":"02e10c"}],"created_at":"2012-05-19T10:38:23Z","state":"closed","user":{"url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146,"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"id":4653757,"pull_request":{"patch_url":null,"diff_url":null,"html_url":null},"html_url":"https://github.com/jacquev6/PyGithub/issues/31"}