mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 19:31:10 +00:00
Merge pull request #218 from farrd/master
Can now specify assignee as a string
This commit is contained in:
+6
-3
@@ -262,7 +262,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
:calls: `PATCH /repos/:owner/:repo/issues/:number <http://developer.github.com/v3/issues>`_
|
||||
:param title: string
|
||||
:param body: string
|
||||
:param assignee: :class:`github.NamedUser.NamedUser` or None
|
||||
:param assignee: string or :class:`github.NamedUser.NamedUser` or None
|
||||
:param state: string
|
||||
:param milestone: :class:`github.Milestone.Milestone` or None
|
||||
:param labels: list of string
|
||||
@@ -270,7 +270,7 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
assert title is github.GithubObject.NotSet or isinstance(title, (str, unicode)), title
|
||||
assert body is github.GithubObject.NotSet or isinstance(body, (str, unicode)), body
|
||||
assert assignee is github.GithubObject.NotSet or assignee is None or isinstance(assignee, github.NamedUser.NamedUser), assignee
|
||||
assert assignee is github.GithubObject.NotSet or assignee is None or isinstance(assignee, github.NamedUser.NamedUser) or isinstance(assignee, (str, unicode)), assignee
|
||||
assert state is github.GithubObject.NotSet or isinstance(state, (str, unicode)), state
|
||||
assert milestone is github.GithubObject.NotSet or milestone is None or isinstance(milestone, github.Milestone.Milestone), milestone
|
||||
assert labels is github.GithubObject.NotSet or all(isinstance(element, (str, unicode)) for element in labels), labels
|
||||
@@ -280,7 +280,10 @@ class Issue(github.GithubObject.CompletableGithubObject):
|
||||
if body is not github.GithubObject.NotSet:
|
||||
post_parameters["body"] = body
|
||||
if assignee is not github.GithubObject.NotSet:
|
||||
post_parameters["assignee"] = assignee._identity if assignee else ''
|
||||
if isinstance(assignee, (str, unicode)):
|
||||
post_parameters["assignee"] = assignee
|
||||
else:
|
||||
post_parameters["assignee"] = assignee._identity if assignee else ''
|
||||
if state is not github.GithubObject.NotSet:
|
||||
post_parameters["state"] = state
|
||||
if milestone is not github.GithubObject.NotSet:
|
||||
|
||||
+36
-17
@@ -644,13 +644,17 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
def add_to_collaborators(self, collaborator):
|
||||
"""
|
||||
:calls: `PUT /repos/:owner/:repo/collaborators/:user <http://developer.github.com/v3/repos/collaborators>`_
|
||||
:param collaborator: :class:`github.NamedUser.NamedUser`
|
||||
:param collaborator: string or :class:`github.NamedUser.NamedUser`
|
||||
:rtype: None
|
||||
"""
|
||||
assert isinstance(collaborator, github.NamedUser.NamedUser), collaborator
|
||||
assert isinstance(collaborator, github.NamedUser.NamedUser) or isinstance(collaborator, (str, unicode)), collaborator
|
||||
|
||||
if isinstance(collaborator, github.NamedUser.NamedUser):
|
||||
collaborator = collaborator._identity
|
||||
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
"PUT",
|
||||
self.url + "/collaborators/" + collaborator._identity
|
||||
self.url + "/collaborators/" + collaborator
|
||||
)
|
||||
|
||||
def compare(self, base, head):
|
||||
@@ -823,14 +827,14 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
:calls: `POST /repos/:owner/:repo/issues <http://developer.github.com/v3/issues>`_
|
||||
:param title: string
|
||||
:param body: string
|
||||
:param assignee: :class:`github.NamedUser.NamedUser`
|
||||
:param assignee: string or :class:`github.NamedUser.NamedUser`
|
||||
:param milestone: :class:`github.Milestone.Milestone`
|
||||
:param labels: list of :class:`github.Label.Label`
|
||||
:rtype: :class:`github.Issue.Issue`
|
||||
"""
|
||||
assert isinstance(title, (str, unicode)), title
|
||||
assert body is github.GithubObject.NotSet or isinstance(body, (str, unicode)), body
|
||||
assert assignee is github.GithubObject.NotSet or isinstance(assignee, github.NamedUser.NamedUser), assignee
|
||||
assert assignee is github.GithubObject.NotSet or isinstance(assignee, github.NamedUser.NamedUser) or isinstance(assignee, (str, unicode)), assignee
|
||||
assert milestone is github.GithubObject.NotSet or isinstance(milestone, github.Milestone.Milestone), milestone
|
||||
assert labels is github.GithubObject.NotSet or all(isinstance(element, github.Label.Label) for element in labels), labels
|
||||
post_parameters = {
|
||||
@@ -839,7 +843,10 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
if body is not github.GithubObject.NotSet:
|
||||
post_parameters["body"] = body
|
||||
if assignee is not github.GithubObject.NotSet:
|
||||
post_parameters["assignee"] = assignee._identity
|
||||
if isinstance(assignee, (str, unicode)):
|
||||
post_parameters["assignee"] = assignee
|
||||
else:
|
||||
post_parameters["assignee"] = assignee._identity
|
||||
if milestone is not github.GithubObject.NotSet:
|
||||
post_parameters["milestone"] = milestone._identity
|
||||
if labels is not github.GithubObject.NotSet:
|
||||
@@ -1402,7 +1409,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
:calls: `GET /repos/:owner/:repo/issues <http://developer.github.com/v3/issues>`_
|
||||
:param milestone: :class:`github.Milestone.Milestone` or "none" or "*"
|
||||
:param state: string
|
||||
:param assignee: :class:`github.NamedUser.NamedUser` or "none" or "*"
|
||||
:param assignee: string or :class:`github.NamedUser.NamedUser` or "none" or "*"
|
||||
:param mentioned: :class:`github.NamedUser.NamedUser`
|
||||
:param labels: list of :class:`github.Label.Label`
|
||||
:param sort: string
|
||||
@@ -1412,7 +1419,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
"""
|
||||
assert milestone is github.GithubObject.NotSet or milestone == "*" or milestone == "none" or isinstance(milestone, github.Milestone.Milestone), milestone
|
||||
assert state is github.GithubObject.NotSet or isinstance(state, (str, unicode)), state
|
||||
assert assignee is github.GithubObject.NotSet or assignee == "*" or assignee == "none" or isinstance(assignee, github.NamedUser.NamedUser), assignee
|
||||
assert assignee is github.GithubObject.NotSet or isinstance(assignee, github.NamedUser.NamedUser) or isinstance(assignee, (str, unicode)), assignee
|
||||
assert mentioned is github.GithubObject.NotSet or isinstance(mentioned, github.NamedUser.NamedUser), mentioned
|
||||
assert labels is github.GithubObject.NotSet or all(isinstance(element, github.Label.Label) for element in labels), labels
|
||||
assert sort is github.GithubObject.NotSet or isinstance(sort, (str, unicode)), sort
|
||||
@@ -1833,26 +1840,34 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
def has_in_assignees(self, assignee):
|
||||
"""
|
||||
:calls: `GET /repos/:owner/:repo/assignees/:assignee <http://developer.github.com/v3/issues/assignees>`_
|
||||
:param assignee: :class:`github.NamedUser.NamedUser`
|
||||
:param assignee: string or :class:`github.NamedUser.NamedUser`
|
||||
:rtype: bool
|
||||
"""
|
||||
assert isinstance(assignee, github.NamedUser.NamedUser), assignee
|
||||
assert isinstance(assignee, github.NamedUser.NamedUser) or isinstance(assignee, (str, unicode)), assignee
|
||||
|
||||
if isinstance(assignee, github.NamedUser.NamedUser):
|
||||
assignee = assignee._identity
|
||||
|
||||
status, headers, data = self._requester.requestJson(
|
||||
"GET",
|
||||
self.url + "/assignees/" + assignee._identity
|
||||
self.url + "/assignees/" + assignee
|
||||
)
|
||||
return status == 204
|
||||
|
||||
def has_in_collaborators(self, collaborator):
|
||||
"""
|
||||
:calls: `GET /repos/:owner/:repo/collaborators/:user <http://developer.github.com/v3/repos/collaborators>`_
|
||||
:param collaborator: :class:`github.NamedUser.NamedUser`
|
||||
:param collaborator: string or :class:`github.NamedUser.NamedUser`
|
||||
:rtype: bool
|
||||
"""
|
||||
assert isinstance(collaborator, github.NamedUser.NamedUser), collaborator
|
||||
assert isinstance(collaborator, github.NamedUser.NamedUser) or isinstance(collaborator, (str, unicode)), collaborator
|
||||
|
||||
if isinstance(collaborator, github.NamedUser.NamedUser):
|
||||
collaborator = collaborator._identity
|
||||
|
||||
status, headers, data = self._requester.requestJson(
|
||||
"GET",
|
||||
self.url + "/collaborators/" + collaborator._identity
|
||||
self.url + "/collaborators/" + collaborator
|
||||
)
|
||||
return status == 204
|
||||
|
||||
@@ -1904,13 +1919,17 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
def remove_from_collaborators(self, collaborator):
|
||||
"""
|
||||
:calls: `DELETE /repos/:owner/:repo/collaborators/:user <http://developer.github.com/v3/repos/collaborators>`_
|
||||
:param collaborator: :class:`github.NamedUser.NamedUser`
|
||||
:param collaborator: string or :class:`github.NamedUser.NamedUser`
|
||||
:rtype: None
|
||||
"""
|
||||
assert isinstance(collaborator, github.NamedUser.NamedUser), collaborator
|
||||
assert isinstance(collaborator, github.NamedUser.NamedUser) or isinstance(collaborator, (str, unicode)), collaborator
|
||||
|
||||
if isinstance(collaborator, github.NamedUser.NamedUser):
|
||||
collaborator = collaborator._identity
|
||||
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
"DELETE",
|
||||
self.url + "/collaborators/" + collaborator._identity
|
||||
self.url + "/collaborators/" + collaborator
|
||||
)
|
||||
|
||||
def subscribe_to_hub(self, event, callback, secret=github.GithubObject.NotSet):
|
||||
|
||||
@@ -86,3 +86,4 @@ from Issue140 import *
|
||||
from Issue142 import *
|
||||
from Issue158 import *
|
||||
from Issue174 import *
|
||||
from Issue214 import *
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
############################ Copyrights and license ############################
|
||||
# #
|
||||
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
|
||||
# Copyright 2012 Zearin <zearin@gonk.net> #
|
||||
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
|
||||
# #
|
||||
# This file is part of PyGithub. http://jacquev6.github.com/PyGithub/ #
|
||||
# #
|
||||
# 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 <http://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
################################################################################
|
||||
|
||||
import github
|
||||
|
||||
import Framework
|
||||
|
||||
|
||||
class Issue214(Framework.TestCase): # https://github.com/jacquev6/PyGithub/issues/214
|
||||
def setUp(self):
|
||||
Framework.TestCase.setUp(self)
|
||||
self.repo = self.g.get_user().get_repo("PyGithub")
|
||||
self.issue = self.repo.get_issue(1)
|
||||
|
||||
def testAssignees(self):
|
||||
self.assertTrue(self.repo.has_in_assignees('farrd'))
|
||||
self.assertFalse(self.repo.has_in_assignees('fake'))
|
||||
|
||||
def testCollaborators(self):
|
||||
self.assertTrue(self.repo.has_in_collaborators('farrd'))
|
||||
self.assertFalse(self.repo.has_in_collaborators('fake'))
|
||||
|
||||
self.assertFalse(self.repo.has_in_collaborators('marcmenges'))
|
||||
self.repo.add_to_collaborators('marcmenges')
|
||||
self.assertTrue(self.repo.has_in_collaborators('marcmenges'))
|
||||
|
||||
self.repo.remove_from_collaborators('marcmenges')
|
||||
self.assertFalse(self.repo.has_in_collaborators('marcmenges'))
|
||||
|
||||
def testEditIssue(self):
|
||||
self.assertEqual(self.issue.assignee, None)
|
||||
|
||||
self.issue.edit(assignee='farrd')
|
||||
self.assertEqual(self.issue.assignee.login, 'farrd')
|
||||
|
||||
self.issue.edit(assignee=None)
|
||||
self.assertEqual(self.issue.assignee, None)
|
||||
|
||||
def testCreateIssue(self):
|
||||
issue = self.repo.create_issue("Issue created by PyGithub", assignee='farrd')
|
||||
self.assertEqual(issue.assignee.login, 'farrd')
|
||||
|
||||
def testGetIssues(self):
|
||||
issues = self.repo.get_issues(assignee='farrd')
|
||||
|
||||
for issue in issues:
|
||||
self.assertEqual(issue.assignee.login, 'farrd')
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,22 @@
|
||||
https
|
||||
GET
|
||||
api.github.com
|
||||
None
|
||||
/repos/farrd/PyGithub/assignees/farrd
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
null
|
||||
204
|
||||
[('status', '204 No Content'), ('x-ratelimit-remaining', '4838'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'A99159CE:043C:7376C18:52AF9217'), ('vary', 'Accept-Encoding'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('access-control-allow-credentials', 'true'), ('date', 'Mon, 16 Dec 2013 23:51:51 GMT'), ('access-control-allow-origin', '*'), ('x-ratelimit-reset', '1387240227')]
|
||||
|
||||
|
||||
https
|
||||
GET
|
||||
api.github.com
|
||||
None
|
||||
/repos/farrd/PyGithub/assignees/fake
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
null
|
||||
404
|
||||
[('status', '404 Not Found'), ('x-ratelimit-remaining', '4837'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'A99159CE:0438:2A76207:52AF9218'), ('content-length', '76'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('access-control-allow-credentials', 'true'), ('date', 'Mon, 16 Dec 2013 23:51:52 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1387240227')]
|
||||
{"message":"Not Found","documentation_url":"http://developer.github.com/v3"}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
https
|
||||
GET
|
||||
api.github.com
|
||||
None
|
||||
/repos/farrd/PyGithub/collaborators/farrd
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
null
|
||||
204
|
||||
[('status', '204 No Content'), ('x-ratelimit-remaining', '4765'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'A99159CE:6DAC:7BF4F10:52AF94DB'), ('vary', 'Accept-Encoding'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('access-control-allow-credentials', 'true'), ('date', 'Tue, 17 Dec 2013 00:03:40 GMT'), ('access-control-allow-origin', '*'), ('x-ratelimit-reset', '1387240227')]
|
||||
|
||||
|
||||
https
|
||||
GET
|
||||
api.github.com
|
||||
None
|
||||
/repos/farrd/PyGithub/collaborators/fake
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
null
|
||||
404
|
||||
[('status', '404 Not Found'), ('x-ratelimit-remaining', '4764'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'A99159CE:6DAC:7BF4F8B:52AF94DC'), ('content-length', '76'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('access-control-allow-credentials', 'true'), ('date', 'Tue, 17 Dec 2013 00:03:40 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1387240227')]
|
||||
{"message":"Not Found","documentation_url":"http://developer.github.com/v3"}
|
||||
|
||||
https
|
||||
GET
|
||||
api.github.com
|
||||
None
|
||||
/repos/farrd/PyGithub/collaborators/marcmenges
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
null
|
||||
404
|
||||
[('status', '404 Not Found'), ('x-ratelimit-remaining', '4763'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'A99159CE:6DAA:61929C1:52AF94DC'), ('content-length', '76'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('access-control-allow-credentials', 'true'), ('date', 'Tue, 17 Dec 2013 00:03:40 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1387240227')]
|
||||
{"message":"Not Found","documentation_url":"http://developer.github.com/v3"}
|
||||
|
||||
https
|
||||
PUT
|
||||
api.github.com
|
||||
None
|
||||
/repos/farrd/PyGithub/collaborators/marcmenges
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
null
|
||||
204
|
||||
[('status', '204 No Content'), ('x-ratelimit-remaining', '4762'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'A99159CE:6DAA:6192A15:52AF94DC'), ('vary', 'Accept-Encoding'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('access-control-allow-credentials', 'true'), ('date', 'Tue, 17 Dec 2013 00:03:41 GMT'), ('access-control-allow-origin', '*'), ('x-ratelimit-reset', '1387240227')]
|
||||
|
||||
|
||||
https
|
||||
GET
|
||||
api.github.com
|
||||
None
|
||||
/repos/farrd/PyGithub/collaborators/marcmenges
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
null
|
||||
204
|
||||
[('status', '204 No Content'), ('x-ratelimit-remaining', '4761'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'A99159CE:6DAB:78E7BE4:52AF94DD'), ('vary', 'Accept-Encoding'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('access-control-allow-credentials', 'true'), ('date', 'Tue, 17 Dec 2013 00:03:41 GMT'), ('access-control-allow-origin', '*'), ('x-ratelimit-reset', '1387240227')]
|
||||
|
||||
|
||||
https
|
||||
DELETE
|
||||
api.github.com
|
||||
None
|
||||
/repos/farrd/PyGithub/collaborators/marcmenges
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
null
|
||||
204
|
||||
[('status', '204 No Content'), ('x-ratelimit-remaining', '4760'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'A99159CE:6DAC:7BF51C3:52AF94DD'), ('vary', 'Accept-Encoding'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('access-control-allow-credentials', 'true'), ('date', 'Tue, 17 Dec 2013 00:03:41 GMT'), ('access-control-allow-origin', '*'), ('x-ratelimit-reset', '1387240227')]
|
||||
|
||||
|
||||
https
|
||||
GET
|
||||
api.github.com
|
||||
None
|
||||
/repos/farrd/PyGithub/collaborators/marcmenges
|
||||
{'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
null
|
||||
404
|
||||
[('status', '404 Not Found'), ('x-ratelimit-remaining', '4759'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'A99159CE:6DA9:6920FB1:52AF94DE'), ('content-length', '76'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('access-control-allow-credentials', 'true'), ('date', 'Tue, 17 Dec 2013 00:03:42 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1387240227')]
|
||||
{"message":"Not Found","documentation_url":"http://developer.github.com/v3"}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
https
|
||||
POST
|
||||
api.github.com
|
||||
None
|
||||
/repos/farrd/PyGithub/issues
|
||||
{'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
{"assignee": "farrd", "title": "Issue created by PyGithub"}
|
||||
201
|
||||
[('status', '201 Created'), ('x-ratelimit-remaining', '4828'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'A99159CE:043B:6651E72:52AF921C'), ('access-control-allow-credentials', 'true'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP'), ('location', 'https://api.github.com/repos/farrd/PyGithub/issues/3'), ('content-length', '2592'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('etag', '"900018f8180df60c18df92fcab23cf23"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('date', 'Mon, 16 Dec 2013 23:51:56 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1387240227')]
|
||||
{"url":"https://api.github.com/repos/farrd/PyGithub/issues/3","labels_url":"https://api.github.com/repos/farrd/PyGithub/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/farrd/PyGithub/issues/3/comments","events_url":"https://api.github.com/repos/farrd/PyGithub/issues/3/events","html_url":"https://github.com/farrd/PyGithub/issues/3","id":24390063,"number":3,"title":"Issue created by PyGithub","user":{"login":"farrd","id":1387834,"avatar_url":"https://gravatar.com/avatar/3281acd8cd12337bfba7577736ae663e?d=https%3A%2F%2Fidenticons.github.com%2Fe57fcb2ce01df0e0a8305b6fff8070d8.png&r=x","gravatar_id":"3281acd8cd12337bfba7577736ae663e","url":"https://api.github.com/users/farrd","html_url":"https://github.com/farrd","followers_url":"https://api.github.com/users/farrd/followers","following_url":"https://api.github.com/users/farrd/following{/other_user}","gists_url":"https://api.github.com/users/farrd/gists{/gist_id}","starred_url":"https://api.github.com/users/farrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farrd/subscriptions","organizations_url":"https://api.github.com/users/farrd/orgs","repos_url":"https://api.github.com/users/farrd/repos","events_url":"https://api.github.com/users/farrd/events{/privacy}","received_events_url":"https://api.github.com/users/farrd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","assignee":{"login":"farrd","id":1387834,"avatar_url":"https://gravatar.com/avatar/3281acd8cd12337bfba7577736ae663e?d=https%3A%2F%2Fidenticons.github.com%2Fe57fcb2ce01df0e0a8305b6fff8070d8.png&r=x","gravatar_id":"3281acd8cd12337bfba7577736ae663e","url":"https://api.github.com/users/farrd","html_url":"https://github.com/farrd","followers_url":"https://api.github.com/users/farrd/followers","following_url":"https://api.github.com/users/farrd/following{/other_user}","gists_url":"https://api.github.com/users/farrd/gists{/gist_id}","starred_url":"https://api.github.com/users/farrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farrd/subscriptions","organizations_url":"https://api.github.com/users/farrd/orgs","repos_url":"https://api.github.com/users/farrd/repos","events_url":"https://api.github.com/users/farrd/events{/privacy}","received_events_url":"https://api.github.com/users/farrd/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2013-12-16T23:51:56Z","updated_at":"2013-12-16T23:51:56Z","closed_at":null,"pull_request":{"html_url":null,"diff_url":null,"patch_url":null},"body":null,"closed_by":null}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
https
|
||||
PATCH
|
||||
api.github.com
|
||||
None
|
||||
/repos/farrd/PyGithub/issues/1
|
||||
{'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
{"assignee": "farrd"}
|
||||
200
|
||||
[('status', '200 OK'), ('x-ratelimit-remaining', '4824'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'A99159CE:043C:7377930:52AF921D'), ('access-control-allow-credentials', 'true'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('content-length', '2575'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('etag', '"fa6d38417e4f455619cdfe179b7b1e40"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('date', 'Mon, 16 Dec 2013 23:51:58 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1387240227')]
|
||||
{"url":"https://api.github.com/repos/farrd/PyGithub/issues/1","labels_url":"https://api.github.com/repos/farrd/PyGithub/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/farrd/PyGithub/issues/1/comments","events_url":"https://api.github.com/repos/farrd/PyGithub/issues/1/events","html_url":"https://github.com/farrd/PyGithub/issues/1","id":24389294,"number":1,"title":"Test Issue","user":{"login":"farrd","id":1387834,"avatar_url":"https://gravatar.com/avatar/3281acd8cd12337bfba7577736ae663e?d=https%3A%2F%2Fidenticons.github.com%2Fe57fcb2ce01df0e0a8305b6fff8070d8.png&r=x","gravatar_id":"3281acd8cd12337bfba7577736ae663e","url":"https://api.github.com/users/farrd","html_url":"https://github.com/farrd","followers_url":"https://api.github.com/users/farrd/followers","following_url":"https://api.github.com/users/farrd/following{/other_user}","gists_url":"https://api.github.com/users/farrd/gists{/gist_id}","starred_url":"https://api.github.com/users/farrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farrd/subscriptions","organizations_url":"https://api.github.com/users/farrd/orgs","repos_url":"https://api.github.com/users/farrd/repos","events_url":"https://api.github.com/users/farrd/events{/privacy}","received_events_url":"https://api.github.com/users/farrd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","assignee":{"login":"farrd","id":1387834,"avatar_url":"https://gravatar.com/avatar/3281acd8cd12337bfba7577736ae663e?d=https%3A%2F%2Fidenticons.github.com%2Fe57fcb2ce01df0e0a8305b6fff8070d8.png&r=x","gravatar_id":"3281acd8cd12337bfba7577736ae663e","url":"https://api.github.com/users/farrd","html_url":"https://github.com/farrd","followers_url":"https://api.github.com/users/farrd/followers","following_url":"https://api.github.com/users/farrd/following{/other_user}","gists_url":"https://api.github.com/users/farrd/gists{/gist_id}","starred_url":"https://api.github.com/users/farrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farrd/subscriptions","organizations_url":"https://api.github.com/users/farrd/orgs","repos_url":"https://api.github.com/users/farrd/repos","events_url":"https://api.github.com/users/farrd/events{/privacy}","received_events_url":"https://api.github.com/users/farrd/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2013-12-16T23:36:11Z","updated_at":"2013-12-16T23:51:58Z","closed_at":null,"pull_request":{"html_url":null,"diff_url":null,"patch_url":null},"body":"","closed_by":null}
|
||||
|
||||
https
|
||||
PATCH
|
||||
api.github.com
|
||||
None
|
||||
/repos/farrd/PyGithub/issues/1
|
||||
{'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
{"assignee": ""}
|
||||
200
|
||||
[('status', '200 OK'), ('x-ratelimit-remaining', '4823'), ('x-github-media-type', 'github.beta; format=json'), ('x-content-type-options', 'nosniff'), ('access-control-expose-headers', 'ETag, Link, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval'), ('x-github-request-id', 'A99159CE:043C:7377A01:52AF921E'), ('access-control-allow-credentials', 'true'), ('vary', 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding'), ('content-length', '1621'), ('server', 'GitHub.com'), ('x-ratelimit-limit', '5000'), ('etag', '"f6bb6e7859e5f62cdc99f6fc6cbe0c09"'), ('cache-control', 'private, max-age=60, s-maxage=60'), ('date', 'Mon, 16 Dec 2013 23:51:58 GMT'), ('access-control-allow-origin', '*'), ('content-type', 'application/json; charset=utf-8'), ('x-ratelimit-reset', '1387240227')]
|
||||
{"url":"https://api.github.com/repos/farrd/PyGithub/issues/1","labels_url":"https://api.github.com/repos/farrd/PyGithub/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/farrd/PyGithub/issues/1/comments","events_url":"https://api.github.com/repos/farrd/PyGithub/issues/1/events","html_url":"https://github.com/farrd/PyGithub/issues/1","id":24389294,"number":1,"title":"Test Issue","user":{"login":"farrd","id":1387834,"avatar_url":"https://gravatar.com/avatar/3281acd8cd12337bfba7577736ae663e?d=https%3A%2F%2Fidenticons.github.com%2Fe57fcb2ce01df0e0a8305b6fff8070d8.png&r=x","gravatar_id":"3281acd8cd12337bfba7577736ae663e","url":"https://api.github.com/users/farrd","html_url":"https://github.com/farrd","followers_url":"https://api.github.com/users/farrd/followers","following_url":"https://api.github.com/users/farrd/following{/other_user}","gists_url":"https://api.github.com/users/farrd/gists{/gist_id}","starred_url":"https://api.github.com/users/farrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farrd/subscriptions","organizations_url":"https://api.github.com/users/farrd/orgs","repos_url":"https://api.github.com/users/farrd/repos","events_url":"https://api.github.com/users/farrd/events{/privacy}","received_events_url":"https://api.github.com/users/farrd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","assignee":null,"milestone":null,"comments":0,"created_at":"2013-12-16T23:36:11Z","updated_at":"2013-12-16T23:51:58Z","closed_at":null,"pull_request":{"html_url":null,"diff_url":null,"patch_url":null},"body":"","closed_by":null}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user