mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
Remove many useless conversions to string
This commit is contained in:
@@ -1 +1 @@
|
||||
str( {{ value|join:"." }} )
|
||||
{{ value|join:"." }}
|
||||
@@ -1 +1 @@
|
||||
str( self.{{ value|join:"." }} )
|
||||
self.{{ value|join:"." }}
|
||||
@@ -1 +1 @@
|
||||
str( {{ value|join:"." }}._identity )
|
||||
{{ value|join:"." }}._identity
|
||||
@@ -156,7 +156,7 @@ class AuthenticatedUser( GithubObject.GithubObject ):
|
||||
assert isinstance( following, NamedUser.NamedUser ), following
|
||||
status, headers, data = self._request(
|
||||
"PUT",
|
||||
"https://api.github.com/user/following/" + str( following._identity ),
|
||||
"https://api.github.com/user/following/" + following._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -166,7 +166,7 @@ class AuthenticatedUser( GithubObject.GithubObject ):
|
||||
assert isinstance( watched, Repository.Repository ), watched
|
||||
status, headers, data = self._request(
|
||||
"PUT",
|
||||
"https://api.github.com/user/watched/" + str( watched._identity ),
|
||||
"https://api.github.com/user/watched/" + watched._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -196,7 +196,7 @@ class AuthenticatedUser( GithubObject.GithubObject ):
|
||||
assert isinstance( repo, Repository.Repository ), repo
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
"https://api.github.com/repos/" + str( repo.owner.login ) + "/" + str( repo.name ) + "/forks",
|
||||
"https://api.github.com/repos/" + repo.owner.login + "/" + repo.name + "/forks",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -443,7 +443,7 @@ class AuthenticatedUser( GithubObject.GithubObject ):
|
||||
assert isinstance( org, Organization.Organization ), org
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
"https://api.github.com/users/" + str( self.login ) + "/events/orgs/" + str( org.login ),
|
||||
"https://api.github.com/users/" + self.login + "/events/orgs/" + org.login,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -474,7 +474,7 @@ class AuthenticatedUser( GithubObject.GithubObject ):
|
||||
assert isinstance( name, ( str, unicode ) ), name
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
"https://api.github.com/repos/" + str( self.login ) + "/" + str( name ),
|
||||
"https://api.github.com/repos/" + self.login + "/" + name,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -540,7 +540,7 @@ class AuthenticatedUser( GithubObject.GithubObject ):
|
||||
assert isinstance( following, NamedUser.NamedUser ), following
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
"https://api.github.com/user/following/" + str( following._identity ),
|
||||
"https://api.github.com/user/following/" + following._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -550,7 +550,7 @@ class AuthenticatedUser( GithubObject.GithubObject ):
|
||||
assert isinstance( watched, Repository.Repository ), watched
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
"https://api.github.com/user/watched/" + str( watched._identity ),
|
||||
"https://api.github.com/user/watched/" + watched._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -571,7 +571,7 @@ class AuthenticatedUser( GithubObject.GithubObject ):
|
||||
assert isinstance( following, NamedUser.NamedUser ), following
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
"https://api.github.com/user/following/" + str( following._identity ),
|
||||
"https://api.github.com/user/following/" + following._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -581,7 +581,7 @@ class AuthenticatedUser( GithubObject.GithubObject ):
|
||||
assert isinstance( watched, Repository.Repository ), watched
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
"https://api.github.com/user/watched/" + str( watched._identity ),
|
||||
"https://api.github.com/user/watched/" + watched._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
|
||||
@@ -54,7 +54,7 @@ class Authorization( GithubObject.GithubObject ):
|
||||
def delete( self ):
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -79,7 +79,7 @@ class Authorization( GithubObject.GithubObject ):
|
||||
post_parameters[ "note_url" ] = note_url
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
|
||||
@@ -68,7 +68,7 @@ class Commit( GithubObject.GithubObject ):
|
||||
post_parameters[ "position" ] = position
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/comments",
|
||||
self.url + "/comments",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -78,7 +78,7 @@ class Commit( GithubObject.GithubObject ):
|
||||
def get_comments( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/comments",
|
||||
self.url + "/comments",
|
||||
None,
|
||||
None
|
||||
)
|
||||
|
||||
@@ -64,7 +64,7 @@ class CommitComment( GithubObject.GithubObject ):
|
||||
def delete( self ):
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -77,7 +77,7 @@ class CommitComment( GithubObject.GithubObject ):
|
||||
}
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
|
||||
@@ -107,7 +107,7 @@ class Download( GithubObject.GithubObject ):
|
||||
def delete( self ):
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
None
|
||||
)
|
||||
|
||||
+8
-8
@@ -94,7 +94,7 @@ class Gist( GithubObject.GithubObject ):
|
||||
}
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/comments",
|
||||
self.url + "/comments",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -104,7 +104,7 @@ class Gist( GithubObject.GithubObject ):
|
||||
def create_fork( self ):
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/fork",
|
||||
self.url + "/fork",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -114,7 +114,7 @@ class Gist( GithubObject.GithubObject ):
|
||||
def delete( self ):
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -130,7 +130,7 @@ class Gist( GithubObject.GithubObject ):
|
||||
post_parameters[ "files" ] = dict( ( key, value._identity ) for key, value in files.iteritems() )
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -151,7 +151,7 @@ class Gist( GithubObject.GithubObject ):
|
||||
def get_comments( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/comments",
|
||||
self.url + "/comments",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -166,7 +166,7 @@ class Gist( GithubObject.GithubObject ):
|
||||
def is_starred( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/star",
|
||||
self.url + "/star",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -175,7 +175,7 @@ class Gist( GithubObject.GithubObject ):
|
||||
def reset_starred( self ):
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ) + "/star",
|
||||
self.url + "/star",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -184,7 +184,7 @@ class Gist( GithubObject.GithubObject ):
|
||||
def set_starred( self ):
|
||||
status, headers, data = self._request(
|
||||
"PUT",
|
||||
str( self.url ) + "/star",
|
||||
self.url + "/star",
|
||||
None,
|
||||
None
|
||||
)
|
||||
|
||||
@@ -39,7 +39,7 @@ class GistComment( GithubObject.GithubObject ):
|
||||
def delete( self ):
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -52,7 +52,7 @@ class GistComment( GithubObject.GithubObject ):
|
||||
}
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
|
||||
@@ -45,7 +45,7 @@ class GitCommit( GithubObject.GithubObject ):
|
||||
|
||||
@property
|
||||
def _identity( self ):
|
||||
return str( self.sha )
|
||||
return self.sha
|
||||
|
||||
def _initAttributes( self ):
|
||||
self._author = GithubObject.NotSet
|
||||
|
||||
@@ -24,7 +24,7 @@ class GitRef( GithubObject.GithubObject ):
|
||||
def delete( self ):
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -40,7 +40,7 @@ class GitRef( GithubObject.GithubObject ):
|
||||
post_parameters[ "force" ] = force
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
|
||||
+3
-3
@@ -54,7 +54,7 @@ class Hook( GithubObject.GithubObject ):
|
||||
def delete( self ):
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -81,7 +81,7 @@ class Hook( GithubObject.GithubObject ):
|
||||
post_parameters[ "active" ] = active
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -91,7 +91,7 @@ class Hook( GithubObject.GithubObject ):
|
||||
def test( self ):
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/test",
|
||||
self.url + "/test",
|
||||
None,
|
||||
None
|
||||
)
|
||||
|
||||
+10
-10
@@ -108,7 +108,7 @@ class Issue( GithubObject.GithubObject ):
|
||||
post_parameters = [ label._identity for label in labels ]
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/labels",
|
||||
self.url + "/labels",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -121,7 +121,7 @@ class Issue( GithubObject.GithubObject ):
|
||||
}
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/comments",
|
||||
self.url + "/comments",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -131,7 +131,7 @@ class Issue( GithubObject.GithubObject ):
|
||||
def delete_labels( self ):
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ) + "/labels",
|
||||
self.url + "/labels",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -159,7 +159,7 @@ class Issue( GithubObject.GithubObject ):
|
||||
post_parameters[ "labels" ] = labels
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -170,7 +170,7 @@ class Issue( GithubObject.GithubObject ):
|
||||
assert isinstance( id, int ), id
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
self._parentUrl( str( self.url ) ) + "/comments/" + str( id ),
|
||||
self._parentUrl( self.url ) + "/comments/" + str( id ),
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -180,7 +180,7 @@ class Issue( GithubObject.GithubObject ):
|
||||
def get_comments( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/comments",
|
||||
self.url + "/comments",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -195,7 +195,7 @@ class Issue( GithubObject.GithubObject ):
|
||||
def get_events( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/events",
|
||||
self.url + "/events",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -210,7 +210,7 @@ class Issue( GithubObject.GithubObject ):
|
||||
def get_labels( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/labels",
|
||||
self.url + "/labels",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -226,7 +226,7 @@ class Issue( GithubObject.GithubObject ):
|
||||
assert isinstance( label, Label.Label ), label
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ) + "/labels/" + str( label._identity ),
|
||||
self.url + "/labels/" + label._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -237,7 +237,7 @@ class Issue( GithubObject.GithubObject ):
|
||||
post_parameters = [ label._identity for label in labels ]
|
||||
status, headers, data = self._request(
|
||||
"PUT",
|
||||
str( self.url ) + "/labels",
|
||||
self.url + "/labels",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
|
||||
@@ -39,7 +39,7 @@ class IssueComment( GithubObject.GithubObject ):
|
||||
def delete( self ):
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -52,7 +52,7 @@ class IssueComment( GithubObject.GithubObject ):
|
||||
}
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
|
||||
+3
-3
@@ -24,7 +24,7 @@ class Label( GithubObject.GithubObject ):
|
||||
def delete( self ):
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -39,7 +39,7 @@ class Label( GithubObject.GithubObject ):
|
||||
}
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -48,7 +48,7 @@ class Label( GithubObject.GithubObject ):
|
||||
|
||||
@property
|
||||
def _identity( self ):
|
||||
return urllib.quote( str( self.name ) )
|
||||
return urllib.quote( self.name )
|
||||
|
||||
def _initAttributes( self ):
|
||||
self._color = GithubObject.NotSet
|
||||
|
||||
@@ -66,7 +66,7 @@ class Milestone( GithubObject.GithubObject ):
|
||||
def delete( self ):
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -88,7 +88,7 @@ class Milestone( GithubObject.GithubObject ):
|
||||
post_parameters[ "due_on" ] = due_on
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -98,7 +98,7 @@ class Milestone( GithubObject.GithubObject ):
|
||||
def get_labels( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/labels",
|
||||
self.url + "/labels",
|
||||
None,
|
||||
None
|
||||
)
|
||||
|
||||
+13
-13
@@ -155,7 +155,7 @@ class NamedUser( GithubObject.GithubObject ):
|
||||
post_parameters[ "description" ] = description
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/gists",
|
||||
self.url + "/gists",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -165,7 +165,7 @@ class NamedUser( GithubObject.GithubObject ):
|
||||
def get_events( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/events",
|
||||
self.url + "/events",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -180,7 +180,7 @@ class NamedUser( GithubObject.GithubObject ):
|
||||
def get_followers( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/followers",
|
||||
self.url + "/followers",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -195,7 +195,7 @@ class NamedUser( GithubObject.GithubObject ):
|
||||
def get_following( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/following",
|
||||
self.url + "/following",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -210,7 +210,7 @@ class NamedUser( GithubObject.GithubObject ):
|
||||
def get_gists( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/gists",
|
||||
self.url + "/gists",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -225,7 +225,7 @@ class NamedUser( GithubObject.GithubObject ):
|
||||
def get_orgs( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/orgs",
|
||||
self.url + "/orgs",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -240,7 +240,7 @@ class NamedUser( GithubObject.GithubObject ):
|
||||
def get_public_events( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/events/public",
|
||||
self.url + "/events/public",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -255,7 +255,7 @@ class NamedUser( GithubObject.GithubObject ):
|
||||
def get_public_received_events( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/received_events/public",
|
||||
self.url + "/received_events/public",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -270,7 +270,7 @@ class NamedUser( GithubObject.GithubObject ):
|
||||
def get_received_events( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/received_events",
|
||||
self.url + "/received_events",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -286,7 +286,7 @@ class NamedUser( GithubObject.GithubObject ):
|
||||
assert isinstance( name, ( str, unicode ) ), name
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
"https://api.github.com/repos/" + str( self.login ) + "/" + str( name ),
|
||||
"https://api.github.com/repos/" + self.login + "/" + name,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -300,7 +300,7 @@ class NamedUser( GithubObject.GithubObject ):
|
||||
url_parameters[ "type" ] = type
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/repos",
|
||||
self.url + "/repos",
|
||||
url_parameters,
|
||||
None
|
||||
)
|
||||
@@ -315,7 +315,7 @@ class NamedUser( GithubObject.GithubObject ):
|
||||
def get_watched( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/watched",
|
||||
self.url + "/watched",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -329,7 +329,7 @@ class NamedUser( GithubObject.GithubObject ):
|
||||
|
||||
@property
|
||||
def _identity( self ):
|
||||
return str( self.login )
|
||||
return self.login
|
||||
|
||||
def _initAttributes( self ):
|
||||
self._avatar_url = GithubObject.NotSet
|
||||
|
||||
+16
-16
@@ -135,7 +135,7 @@ class Organization( GithubObject.GithubObject ):
|
||||
assert isinstance( public_member, NamedUser.NamedUser ), public_member
|
||||
status, headers, data = self._request(
|
||||
"PUT",
|
||||
str( self.url ) + "/public_members/" + str( public_member._identity ),
|
||||
self.url + "/public_members/" + public_member._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -144,11 +144,11 @@ class Organization( GithubObject.GithubObject ):
|
||||
def create_fork( self, repo ):
|
||||
assert isinstance( repo, Repository.Repository ), repo
|
||||
url_parameters = {
|
||||
"org": str( self.login ),
|
||||
"org": self.login,
|
||||
}
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
"https://api.github.com/repos/" + str( repo.owner.login ) + "/" + str( repo.name ) + "/forks",
|
||||
"https://api.github.com/repos/" + repo.owner.login + "/" + repo.name + "/forks",
|
||||
url_parameters,
|
||||
None
|
||||
)
|
||||
@@ -183,7 +183,7 @@ class Organization( GithubObject.GithubObject ):
|
||||
post_parameters[ "team_id" ] = team_id
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/repos",
|
||||
self.url + "/repos",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -203,7 +203,7 @@ class Organization( GithubObject.GithubObject ):
|
||||
post_parameters[ "permission" ] = permission
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/teams",
|
||||
self.url + "/teams",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -232,7 +232,7 @@ class Organization( GithubObject.GithubObject ):
|
||||
post_parameters[ "name" ] = name
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -242,7 +242,7 @@ class Organization( GithubObject.GithubObject ):
|
||||
def get_events( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/events",
|
||||
self.url + "/events",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -257,7 +257,7 @@ class Organization( GithubObject.GithubObject ):
|
||||
def get_members( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/members",
|
||||
self.url + "/members",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -272,7 +272,7 @@ class Organization( GithubObject.GithubObject ):
|
||||
def get_public_members( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/public_members",
|
||||
self.url + "/public_members",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -288,7 +288,7 @@ class Organization( GithubObject.GithubObject ):
|
||||
assert isinstance( name, ( str, unicode ) ), name
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
"https://api.github.com/repos/" + str( self.login ) + "/" + str( name ),
|
||||
"https://api.github.com/repos/" + self.login + "/" + name,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -302,7 +302,7 @@ class Organization( GithubObject.GithubObject ):
|
||||
url_parameters[ "type" ] = type
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/repos",
|
||||
self.url + "/repos",
|
||||
url_parameters,
|
||||
None
|
||||
)
|
||||
@@ -328,7 +328,7 @@ class Organization( GithubObject.GithubObject ):
|
||||
def get_teams( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/teams",
|
||||
self.url + "/teams",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -344,7 +344,7 @@ class Organization( GithubObject.GithubObject ):
|
||||
assert isinstance( member, NamedUser.NamedUser ), member
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/members/" + str( member._identity ),
|
||||
self.url + "/members/" + member._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -354,7 +354,7 @@ class Organization( GithubObject.GithubObject ):
|
||||
assert isinstance( public_member, NamedUser.NamedUser ), public_member
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/public_members/" + str( public_member._identity ),
|
||||
self.url + "/public_members/" + public_member._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -364,7 +364,7 @@ class Organization( GithubObject.GithubObject ):
|
||||
assert isinstance( member, NamedUser.NamedUser ), member
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ) + "/members/" + str( member._identity ),
|
||||
self.url + "/members/" + member._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -374,7 +374,7 @@ class Organization( GithubObject.GithubObject ):
|
||||
assert isinstance( public_member, NamedUser.NamedUser ), public_member
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ) + "/public_members/" + str( public_member._identity ),
|
||||
self.url + "/public_members/" + public_member._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
|
||||
@@ -155,7 +155,7 @@ class PullRequest( GithubObject.GithubObject ):
|
||||
}
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/comments",
|
||||
self.url + "/comments",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -175,7 +175,7 @@ class PullRequest( GithubObject.GithubObject ):
|
||||
post_parameters[ "state" ] = state
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -186,7 +186,7 @@ class PullRequest( GithubObject.GithubObject ):
|
||||
assert isinstance( id, int ), id
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
self._parentUrl( str( self.url ) ) + "/comments/" + str( id ),
|
||||
self._parentUrl( self.url ) + "/comments/" + str( id ),
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -196,7 +196,7 @@ class PullRequest( GithubObject.GithubObject ):
|
||||
def get_comments( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/comments",
|
||||
self.url + "/comments",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -211,7 +211,7 @@ class PullRequest( GithubObject.GithubObject ):
|
||||
def get_commits( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/commits",
|
||||
self.url + "/commits",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -226,7 +226,7 @@ class PullRequest( GithubObject.GithubObject ):
|
||||
def get_files( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/files",
|
||||
self.url + "/files",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -241,7 +241,7 @@ class PullRequest( GithubObject.GithubObject ):
|
||||
def is_merged( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/merge",
|
||||
self.url + "/merge",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -254,7 +254,7 @@ class PullRequest( GithubObject.GithubObject ):
|
||||
post_parameters[ "commit_message" ] = commit_message
|
||||
status, headers, data = self._request(
|
||||
"PUT",
|
||||
str( self.url ) + "/merge",
|
||||
self.url + "/merge",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
|
||||
@@ -64,7 +64,7 @@ class PullRequestComment( GithubObject.GithubObject ):
|
||||
def delete( self ):
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -77,7 +77,7 @@ class PullRequestComment( GithubObject.GithubObject ):
|
||||
}
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
|
||||
+54
-54
@@ -188,7 +188,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( collaborator, NamedUser.NamedUser ), collaborator
|
||||
status, headers, data = self._request(
|
||||
"PUT",
|
||||
str( self.url ) + "/collaborators/" + str( collaborator._identity ),
|
||||
self.url + "/collaborators/" + collaborator._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -199,7 +199,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( head, ( str, unicode ) ), head
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/compare/" + str( base ) + "..." + str( head ),
|
||||
self.url + "/compare/" + base + "..." + head,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -221,7 +221,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
post_parameters[ "content_type" ] = content_type
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/downloads",
|
||||
self.url + "/downloads",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -237,7 +237,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
}
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/git/blobs",
|
||||
self.url + "/git/blobs",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -261,7 +261,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
post_parameters[ "committer" ] = committer._identity
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/git/commits",
|
||||
self.url + "/git/commits",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -277,7 +277,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
}
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/git/refs",
|
||||
self.url + "/git/refs",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -300,7 +300,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
post_parameters[ "tagger" ] = tagger._identity
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/git/tags",
|
||||
self.url + "/git/tags",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -317,7 +317,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
post_parameters[ "base_tree" ] = base_tree
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/git/trees",
|
||||
self.url + "/git/trees",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -339,7 +339,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
post_parameters[ "active" ] = active
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/hooks",
|
||||
self.url + "/hooks",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -365,7 +365,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
post_parameters[ "labels" ] = labels
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/issues",
|
||||
self.url + "/issues",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -381,7 +381,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
}
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/keys",
|
||||
self.url + "/keys",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -397,7 +397,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
}
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/labels",
|
||||
self.url + "/labels",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -420,7 +420,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
post_parameters[ "due_on" ] = due_on
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/milestones",
|
||||
self.url + "/milestones",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -450,7 +450,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
post_parameters = kwds
|
||||
status, headers, data = self._request(
|
||||
"POST",
|
||||
str( self.url ) + "/pulls",
|
||||
self.url + "/pulls",
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -482,7 +482,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
post_parameters[ "has_downloads" ] = has_downloads
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -492,7 +492,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_branches( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/branches",
|
||||
self.url + "/branches",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -507,7 +507,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_collaborators( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/collaborators",
|
||||
self.url + "/collaborators",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -523,7 +523,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( id, int ), id
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/comments/" + str( id ),
|
||||
self.url + "/comments/" + str( id ),
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -533,7 +533,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_comments( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/comments",
|
||||
self.url + "/comments",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -549,7 +549,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( sha, ( str, unicode ) ), sha
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/commits/" + str( sha ),
|
||||
self.url + "/commits/" + sha,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -566,7 +566,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
url_parameters[ "path" ] = path
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/commits",
|
||||
self.url + "/commits",
|
||||
url_parameters,
|
||||
None
|
||||
)
|
||||
@@ -581,7 +581,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_contributors( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/contributors",
|
||||
self.url + "/contributors",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -597,7 +597,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( id, int ), id
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/downloads/" + str( id ),
|
||||
self.url + "/downloads/" + str( id ),
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -607,7 +607,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_downloads( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/downloads",
|
||||
self.url + "/downloads",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -622,7 +622,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_events( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/events",
|
||||
self.url + "/events",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -637,7 +637,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_forks( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/forks",
|
||||
self.url + "/forks",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -653,7 +653,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( sha, ( str, unicode ) ), sha
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/git/blobs/" + str( sha ),
|
||||
self.url + "/git/blobs/" + sha,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -664,7 +664,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( sha, ( str, unicode ) ), sha
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/git/commits/" + str( sha ),
|
||||
self.url + "/git/commits/" + sha,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -675,7 +675,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( ref, ( str, unicode ) ), ref
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/git/" + str( ref ),
|
||||
self.url + "/git/" + ref,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -685,7 +685,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_git_refs( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/git/refs",
|
||||
self.url + "/git/refs",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -701,7 +701,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( sha, ( str, unicode ) ), sha
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/git/tags/" + str( sha ),
|
||||
self.url + "/git/tags/" + sha,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -716,7 +716,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
url_parameters[ "recursive" ] = recursive
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/git/trees/" + str( sha ),
|
||||
self.url + "/git/trees/" + sha,
|
||||
url_parameters,
|
||||
None
|
||||
)
|
||||
@@ -727,7 +727,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( id, int ), id
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/hooks/" + str( id ),
|
||||
self.url + "/hooks/" + str( id ),
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -737,7 +737,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_hooks( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/hooks",
|
||||
self.url + "/hooks",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -753,7 +753,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( number, int ), number
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/issues/" + str( number ),
|
||||
self.url + "/issues/" + str( number ),
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -788,7 +788,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
url_parameters[ "since" ] = since
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/issues",
|
||||
self.url + "/issues",
|
||||
url_parameters,
|
||||
None
|
||||
)
|
||||
@@ -804,7 +804,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( id, int ), id
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/issues/events/" + str( id ),
|
||||
self.url + "/issues/events/" + str( id ),
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -814,7 +814,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_issues_events( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/issues/events",
|
||||
self.url + "/issues/events",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -830,7 +830,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( id, int ), id
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/keys/" + str( id ),
|
||||
self.url + "/keys/" + str( id ),
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -840,7 +840,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_keys( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/keys",
|
||||
self.url + "/keys",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -856,7 +856,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( name, ( str, unicode ) ), name
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/labels/" + urllib.quote( str( name ) ),
|
||||
self.url + "/labels/" + urllib.quote( name ),
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -866,7 +866,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_labels( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/labels",
|
||||
self.url + "/labels",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -881,7 +881,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_languages( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/languages",
|
||||
self.url + "/languages",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -892,7 +892,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( number, int ), number
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/milestones/" + str( number ),
|
||||
self.url + "/milestones/" + str( number ),
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -912,7 +912,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
url_parameters[ "direction" ] = direction
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/milestones",
|
||||
self.url + "/milestones",
|
||||
url_parameters,
|
||||
None
|
||||
)
|
||||
@@ -927,7 +927,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_network_events( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
"https://api.github.com/networks/" + str( self.owner.login ) + "/" + str( self.name ) + "/events",
|
||||
"https://api.github.com/networks/" + self.owner.login + "/" + self.name + "/events",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -943,7 +943,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( number, int ), number
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/pulls/" + str( number ),
|
||||
self.url + "/pulls/" + str( number ),
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -957,7 +957,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
url_parameters[ "state" ] = state
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/pulls",
|
||||
self.url + "/pulls",
|
||||
url_parameters,
|
||||
None
|
||||
)
|
||||
@@ -972,7 +972,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_tags( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/tags",
|
||||
self.url + "/tags",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -987,7 +987,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_teams( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/teams",
|
||||
self.url + "/teams",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -1002,7 +1002,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
def get_watchers( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/watchers",
|
||||
self.url + "/watchers",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -1018,7 +1018,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( collaborator, NamedUser.NamedUser ), collaborator
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/collaborators/" + str( collaborator._identity ),
|
||||
self.url + "/collaborators/" + collaborator._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -1028,7 +1028,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
assert isinstance( collaborator, NamedUser.NamedUser ), collaborator
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ) + "/collaborators/" + str( collaborator._identity ),
|
||||
self.url + "/collaborators/" + collaborator._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -1036,7 +1036,7 @@ class Repository( GithubObject.GithubObject ):
|
||||
|
||||
@property
|
||||
def _identity( self ):
|
||||
return str( self.owner.login ) + "/" + str( self.name )
|
||||
return self.owner.login + "/" + self.name
|
||||
|
||||
def _initAttributes( self ):
|
||||
self._clone_url = GithubObject.NotSet
|
||||
|
||||
+10
-10
@@ -42,7 +42,7 @@ class Team( GithubObject.GithubObject ):
|
||||
assert isinstance( member, NamedUser.NamedUser ), member
|
||||
status, headers, data = self._request(
|
||||
"PUT",
|
||||
str( self.url ) + "/members/" + str( member._identity ),
|
||||
self.url + "/members/" + member._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -52,7 +52,7 @@ class Team( GithubObject.GithubObject ):
|
||||
assert isinstance( repo, Repository.Repository ), repo
|
||||
status, headers, data = self._request(
|
||||
"PUT",
|
||||
str( self.url ) + "/repos/" + str( repo._identity ),
|
||||
self.url + "/repos/" + repo._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -61,7 +61,7 @@ class Team( GithubObject.GithubObject ):
|
||||
def delete( self ):
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -77,7 +77,7 @@ class Team( GithubObject.GithubObject ):
|
||||
post_parameters[ "permission" ] = permission
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
@@ -87,7 +87,7 @@ class Team( GithubObject.GithubObject ):
|
||||
def get_members( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/members",
|
||||
self.url + "/members",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -102,7 +102,7 @@ class Team( GithubObject.GithubObject ):
|
||||
def get_repos( self ):
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/repos",
|
||||
self.url + "/repos",
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -118,7 +118,7 @@ class Team( GithubObject.GithubObject ):
|
||||
assert isinstance( member, NamedUser.NamedUser ), member
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/members/" + str( member._identity ),
|
||||
self.url + "/members/" + member._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -128,7 +128,7 @@ class Team( GithubObject.GithubObject ):
|
||||
assert isinstance( repo, Repository.Repository ), repo
|
||||
status, headers, data = self._request(
|
||||
"GET",
|
||||
str( self.url ) + "/repos/" + str( repo._identity ),
|
||||
self.url + "/repos/" + repo._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -138,7 +138,7 @@ class Team( GithubObject.GithubObject ):
|
||||
assert isinstance( member, NamedUser.NamedUser ), member
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ) + "/members/" + str( member._identity ),
|
||||
self.url + "/members/" + member._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -148,7 +148,7 @@ class Team( GithubObject.GithubObject ):
|
||||
assert isinstance( repo, Repository.Repository ), repo
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ) + "/repos/" + str( repo._identity ),
|
||||
self.url + "/repos/" + repo._identity,
|
||||
None,
|
||||
None
|
||||
)
|
||||
|
||||
@@ -32,7 +32,7 @@ class UserKey( GithubObject.GithubObject ):
|
||||
def delete( self ):
|
||||
status, headers, data = self._request(
|
||||
"DELETE",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
None
|
||||
)
|
||||
@@ -48,7 +48,7 @@ class UserKey( GithubObject.GithubObject ):
|
||||
post_parameters[ "key" ] = key
|
||||
status, headers, data = self._request(
|
||||
"PATCH",
|
||||
str( self.url ),
|
||||
self.url,
|
||||
None,
|
||||
post_parameters
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user