mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Only one class per file
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{% if method.type.name != "bool" %}
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
{% endif %}
|
||||
|
||||
{% if method.isMutation %}
|
||||
|
||||
@@ -3,7 +3,8 @@ import urllib
|
||||
{% endif %}
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
{% for dependency in class.dependencies %}
|
||||
import {{ dependency }}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import Gist
|
||||
import Repository
|
||||
import NamedUser
|
||||
@@ -155,7 +156,7 @@ class AuthenticatedUser( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def add_to_following( self, following ):
|
||||
assert isinstance( following, NamedUser.NamedUser ), following
|
||||
@@ -166,7 +167,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def add_to_watched( self, watched ):
|
||||
assert isinstance( watched, Repository.Repository ), watched
|
||||
@@ -177,7 +178,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def create_authorization( self, scopes = DefaultValueForOptionalParameters, note = DefaultValueForOptionalParameters, note_url = DefaultValueForOptionalParameters ):
|
||||
if scopes is not DefaultValueForOptionalParameters:
|
||||
@@ -200,7 +201,7 @@ class AuthenticatedUser( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Authorization.Authorization( self.__requester, data, completed = True )
|
||||
|
||||
def create_fork( self, repo ):
|
||||
@@ -212,7 +213,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Repository.Repository( self.__requester, data, completed = True )
|
||||
|
||||
def create_gist( self, public, files, description = DefaultValueForOptionalParameters ):
|
||||
@@ -232,7 +233,7 @@ class AuthenticatedUser( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Gist.Gist( self.__requester, data, completed = True )
|
||||
|
||||
def create_key( self, title, key ):
|
||||
@@ -249,7 +250,7 @@ class AuthenticatedUser( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return UserKey.UserKey( self.__requester, data, completed = True )
|
||||
|
||||
def create_repo( self, name, description = DefaultValueForOptionalParameters, homepage = DefaultValueForOptionalParameters, private = DefaultValueForOptionalParameters, has_issues = DefaultValueForOptionalParameters, has_wiki = DefaultValueForOptionalParameters, has_downloads = DefaultValueForOptionalParameters ):
|
||||
@@ -288,7 +289,7 @@ class AuthenticatedUser( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Repository.Repository( self.__requester, data, completed = True )
|
||||
|
||||
def edit( self, name = DefaultValueForOptionalParameters, email = DefaultValueForOptionalParameters, blog = DefaultValueForOptionalParameters, company = DefaultValueForOptionalParameters, location = DefaultValueForOptionalParameters, hireable = DefaultValueForOptionalParameters, bio = DefaultValueForOptionalParameters ):
|
||||
@@ -328,7 +329,7 @@ class AuthenticatedUser( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def get_authorization( self, id ):
|
||||
@@ -340,7 +341,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Authorization.Authorization( self.__requester, data, completed = True )
|
||||
|
||||
def get_authorizations( self ):
|
||||
@@ -351,7 +352,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Authorization.Authorization,
|
||||
self.__requester,
|
||||
@@ -367,7 +368,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return data
|
||||
|
||||
def get_events( self ):
|
||||
@@ -378,7 +379,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Event.Event,
|
||||
self.__requester,
|
||||
@@ -394,7 +395,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
NamedUser.NamedUser,
|
||||
self.__requester,
|
||||
@@ -410,7 +411,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
NamedUser.NamedUser,
|
||||
self.__requester,
|
||||
@@ -426,7 +427,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Gist.Gist,
|
||||
self.__requester,
|
||||
@@ -442,7 +443,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Issue.Issue,
|
||||
self.__requester,
|
||||
@@ -459,7 +460,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return UserKey.UserKey( self.__requester, data, completed = True )
|
||||
|
||||
def get_keys( self ):
|
||||
@@ -470,7 +471,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
UserKey.UserKey,
|
||||
self.__requester,
|
||||
@@ -487,7 +488,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Event.Event,
|
||||
self.__requester,
|
||||
@@ -503,7 +504,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Organization.Organization,
|
||||
self.__requester,
|
||||
@@ -520,7 +521,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Repository.Repository( self.__requester, data, completed = True )
|
||||
|
||||
def get_repos( self, type = DefaultValueForOptionalParameters, sort = DefaultValueForOptionalParameters, direction = DefaultValueForOptionalParameters ):
|
||||
@@ -544,7 +545,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Repository.Repository,
|
||||
self.__requester,
|
||||
@@ -560,7 +561,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Gist.Gist,
|
||||
self.__requester,
|
||||
@@ -576,7 +577,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Repository.Repository,
|
||||
self.__requester,
|
||||
@@ -614,7 +615,7 @@ class AuthenticatedUser( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def remove_from_following( self, following ):
|
||||
assert isinstance( following, NamedUser.NamedUser ), following
|
||||
@@ -625,7 +626,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def remove_from_watched( self, watched ):
|
||||
assert isinstance( watched, Repository.Repository ), watched
|
||||
@@ -636,7 +637,7 @@ class AuthenticatedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def __initAttributes( self ):
|
||||
self.__avatar_url = None
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import AuthorizationApplication
|
||||
|
||||
class Authorization( object ):
|
||||
@@ -65,7 +66,7 @@ class Authorization( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def edit( self, scopes = DefaultValueForOptionalParameters, add_scopes = DefaultValueForOptionalParameters, remove_scopes = DefaultValueForOptionalParameters, note = DefaultValueForOptionalParameters, note_url = DefaultValueForOptionalParameters ):
|
||||
if scopes is not DefaultValueForOptionalParameters:
|
||||
@@ -96,7 +97,7 @@ class Authorization( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def __initAttributes( self ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class AuthorizationApplication( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import Commit
|
||||
|
||||
class Branch( object ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import CommitFile
|
||||
import NamedUser
|
||||
import GitCommit
|
||||
@@ -81,7 +82,7 @@ class Commit( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return CommitComment.CommitComment( self.__requester, data, completed = True )
|
||||
|
||||
def get_comments( self ):
|
||||
@@ -92,7 +93,7 @@ class Commit( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
CommitComment.CommitComment,
|
||||
self.__requester,
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import NamedUser
|
||||
|
||||
class CommitComment( object ):
|
||||
@@ -75,7 +76,7 @@ class CommitComment( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def edit( self, body ):
|
||||
assert isinstance( body, ( str, unicode ) ), body
|
||||
@@ -89,7 +90,7 @@ class CommitComment( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def __initAttributes( self ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class CommitFile( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class CommitStats( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
|
||||
@@ -2,9 +2,3 @@
|
||||
class DefaultValueForOptionalParametersType:
|
||||
pass
|
||||
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
|
||||
|
||||
class GithubException( Exception ):
|
||||
def __init__( self, status, data ):
|
||||
Exception.__init__( self )
|
||||
self.status = status
|
||||
self.data = data
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class Download( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
@@ -119,7 +120,7 @@ class Download( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def __initAttributes( self ):
|
||||
self.__accesskeyid = None
|
||||
|
||||
+2
-1
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import Organization
|
||||
import Repository
|
||||
import NamedUser
|
||||
|
||||
+10
-9
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import GistHistoryState
|
||||
import NamedUser
|
||||
import Gist
|
||||
@@ -102,7 +103,7 @@ class Gist( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return GistComment.GistComment( self.__requester, data, completed = True )
|
||||
|
||||
def create_fork( self ):
|
||||
@@ -113,7 +114,7 @@ class Gist( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Gist( self.__requester, data, completed = True )
|
||||
|
||||
def delete( self ):
|
||||
@@ -124,7 +125,7 @@ class Gist( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def edit( self, description = DefaultValueForOptionalParameters, files = DefaultValueForOptionalParameters ):
|
||||
if description is not DefaultValueForOptionalParameters:
|
||||
@@ -141,7 +142,7 @@ class Gist( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def get_comment( self, id ):
|
||||
@@ -153,7 +154,7 @@ class Gist( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return GistComment.GistComment( self.__requester, data, completed = True )
|
||||
|
||||
def get_comments( self ):
|
||||
@@ -164,7 +165,7 @@ class Gist( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
GistComment.GistComment,
|
||||
self.__requester,
|
||||
@@ -189,7 +190,7 @@ class Gist( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def set_starred( self ):
|
||||
status, headers, data = self.__requester.request(
|
||||
@@ -199,7 +200,7 @@ class Gist( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def __initAttributes( self ):
|
||||
self.__comments = None
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import NamedUser
|
||||
|
||||
class GistComment( object ):
|
||||
@@ -43,7 +44,7 @@ class GistComment( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def edit( self, body ):
|
||||
assert isinstance( body, ( str, unicode ) ), body
|
||||
@@ -57,7 +58,7 @@ class GistComment( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def __initAttributes( self ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import NamedUser
|
||||
import CommitStats
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class GitAuthor( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class GitBlob( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import GitAuthor
|
||||
import GitCommit
|
||||
import GitTree
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class GitObject( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import GitObject
|
||||
|
||||
class GitRef( object ):
|
||||
@@ -31,7 +32,7 @@ class GitRef( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def edit( self, sha, force = DefaultValueForOptionalParameters ):
|
||||
assert isinstance( sha, ( str, unicode ) ), sha
|
||||
@@ -49,7 +50,7 @@ class GitRef( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def __initAttributes( self ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import GitAuthor
|
||||
import GitObject
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import GitTreeElement
|
||||
|
||||
class GitTree( object ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class GitTreeElement( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
class GithubException( Exception ):
|
||||
def __init__( self, status, data ):
|
||||
Exception.__init__( self )
|
||||
self.status = status
|
||||
self.data = data
|
||||
+5
-4
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import HookResponse
|
||||
|
||||
class Hook( object ):
|
||||
@@ -55,7 +56,7 @@ class Hook( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def edit( self, name, config, events = DefaultValueForOptionalParameters, add_events = DefaultValueForOptionalParameters, remove_events = DefaultValueForOptionalParameters, active = DefaultValueForOptionalParameters ):
|
||||
assert isinstance( name, ( str, unicode ) ), name
|
||||
@@ -86,7 +87,7 @@ class Hook( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def test( self ):
|
||||
@@ -97,7 +98,7 @@ class Hook( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def __initAttributes( self ):
|
||||
self.__active = None
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class HookResponse( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
|
||||
+12
-11
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import Repository
|
||||
import IssueEvent
|
||||
import Label
|
||||
@@ -118,7 +119,7 @@ class Issue( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def create_comment( self, body ):
|
||||
assert isinstance( body, ( str, unicode ) ), body
|
||||
@@ -132,7 +133,7 @@ class Issue( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return IssueComment.IssueComment( self.__requester, data, completed = True )
|
||||
|
||||
def delete_labels( self ):
|
||||
@@ -143,7 +144,7 @@ class Issue( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def edit( self, title = DefaultValueForOptionalParameters, body = DefaultValueForOptionalParameters, assignee = DefaultValueForOptionalParameters, state = DefaultValueForOptionalParameters, milestone = DefaultValueForOptionalParameters, labels = DefaultValueForOptionalParameters ):
|
||||
if title is not DefaultValueForOptionalParameters:
|
||||
@@ -178,7 +179,7 @@ class Issue( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def get_comment( self, id ):
|
||||
@@ -190,7 +191,7 @@ class Issue( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return IssueComment.IssueComment( self.__requester, data, completed = True )
|
||||
|
||||
def get_comments( self ):
|
||||
@@ -201,7 +202,7 @@ class Issue( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
IssueComment.IssueComment,
|
||||
self.__requester,
|
||||
@@ -217,7 +218,7 @@ class Issue( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
IssueEvent.IssueEvent,
|
||||
self.__requester,
|
||||
@@ -233,7 +234,7 @@ class Issue( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Label.Label,
|
||||
self.__requester,
|
||||
@@ -250,7 +251,7 @@ class Issue( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def set_labels( self, *labels ):
|
||||
assert all( isinstance( label, Label.Label ) for label in labels ), labels
|
||||
@@ -262,7 +263,7 @@ class Issue( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def __initAttributes( self ):
|
||||
self.__assignee = None
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import NamedUser
|
||||
|
||||
class IssueComment( object ):
|
||||
@@ -43,7 +44,7 @@ class IssueComment( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def edit( self, body ):
|
||||
assert isinstance( body, ( str, unicode ) ), body
|
||||
@@ -57,7 +58,7 @@ class IssueComment( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def __initAttributes( self ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import Issue
|
||||
import NamedUser
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class IssuePullRequest( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
|
||||
+4
-3
@@ -3,7 +3,8 @@
|
||||
|
||||
import urllib
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class Label( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
@@ -31,7 +32,7 @@ class Label( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def edit( self, name, color ):
|
||||
assert isinstance( name, ( str, unicode ) ), name
|
||||
@@ -47,7 +48,7 @@ class Label( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
@property
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import NamedUser
|
||||
import Label
|
||||
|
||||
@@ -64,7 +65,7 @@ class Milestone( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def edit( self, title, state = DefaultValueForOptionalParameters, description = DefaultValueForOptionalParameters, due_on = DefaultValueForOptionalParameters ):
|
||||
assert isinstance( title, ( str, unicode ) ), title
|
||||
@@ -90,7 +91,7 @@ class Milestone( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def get_labels( self ):
|
||||
@@ -101,7 +102,7 @@ class Milestone( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Label.Label,
|
||||
self.__requester,
|
||||
|
||||
+14
-13
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import Gist
|
||||
import Repository
|
||||
import NamedUser
|
||||
@@ -164,7 +165,7 @@ class NamedUser( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Gist.Gist( self.__requester, data, completed = True )
|
||||
|
||||
def get_events( self ):
|
||||
@@ -175,7 +176,7 @@ class NamedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Event.Event,
|
||||
self.__requester,
|
||||
@@ -191,7 +192,7 @@ class NamedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
NamedUser,
|
||||
self.__requester,
|
||||
@@ -207,7 +208,7 @@ class NamedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
NamedUser,
|
||||
self.__requester,
|
||||
@@ -223,7 +224,7 @@ class NamedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Gist.Gist,
|
||||
self.__requester,
|
||||
@@ -239,7 +240,7 @@ class NamedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Organization.Organization,
|
||||
self.__requester,
|
||||
@@ -255,7 +256,7 @@ class NamedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Event.Event,
|
||||
self.__requester,
|
||||
@@ -271,7 +272,7 @@ class NamedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Event.Event,
|
||||
self.__requester,
|
||||
@@ -287,7 +288,7 @@ class NamedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Event.Event,
|
||||
self.__requester,
|
||||
@@ -304,7 +305,7 @@ class NamedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Repository.Repository( self.__requester, data, completed = True )
|
||||
|
||||
def get_repos( self, type = DefaultValueForOptionalParameters ):
|
||||
@@ -320,7 +321,7 @@ class NamedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Repository.Repository,
|
||||
self.__requester,
|
||||
@@ -336,7 +337,7 @@ class NamedUser( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Repository.Repository,
|
||||
self.__requester,
|
||||
|
||||
+16
-15
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import Team
|
||||
import Plan
|
||||
import Event
|
||||
@@ -145,7 +146,7 @@ class Organization( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def create_fork( self, repo ):
|
||||
assert isinstance( repo, Repository.Repository ), repo
|
||||
@@ -159,7 +160,7 @@ class Organization( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Repository.Repository( self.__requester, data, completed = True )
|
||||
|
||||
def create_repo( self, name, description = DefaultValueForOptionalParameters, homepage = DefaultValueForOptionalParameters, private = DefaultValueForOptionalParameters, has_issues = DefaultValueForOptionalParameters, has_wiki = DefaultValueForOptionalParameters, has_downloads = DefaultValueForOptionalParameters, team_id = DefaultValueForOptionalParameters ):
|
||||
@@ -202,7 +203,7 @@ class Organization( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Repository.Repository( self.__requester, data, completed = True )
|
||||
|
||||
def create_team( self, name, repo_names = DefaultValueForOptionalParameters, permission = DefaultValueForOptionalParameters ):
|
||||
@@ -225,7 +226,7 @@ class Organization( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Team.Team( self.__requester, data, completed = True )
|
||||
|
||||
def edit( self, billing_email = DefaultValueForOptionalParameters, blog = DefaultValueForOptionalParameters, company = DefaultValueForOptionalParameters, email = DefaultValueForOptionalParameters, location = DefaultValueForOptionalParameters, name = DefaultValueForOptionalParameters ):
|
||||
@@ -261,7 +262,7 @@ class Organization( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def get_events( self ):
|
||||
@@ -272,7 +273,7 @@ class Organization( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Event.Event,
|
||||
self.__requester,
|
||||
@@ -288,7 +289,7 @@ class Organization( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
NamedUser.NamedUser,
|
||||
self.__requester,
|
||||
@@ -304,7 +305,7 @@ class Organization( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
NamedUser.NamedUser,
|
||||
self.__requester,
|
||||
@@ -321,7 +322,7 @@ class Organization( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Repository.Repository( self.__requester, data, completed = True )
|
||||
|
||||
def get_repos( self, type = DefaultValueForOptionalParameters ):
|
||||
@@ -337,7 +338,7 @@ class Organization( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Repository.Repository,
|
||||
self.__requester,
|
||||
@@ -354,7 +355,7 @@ class Organization( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Team.Team( self.__requester, data, completed = True )
|
||||
|
||||
def get_teams( self ):
|
||||
@@ -365,7 +366,7 @@ class Organization( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Team.Team,
|
||||
self.__requester,
|
||||
@@ -402,7 +403,7 @@ class Organization( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def remove_from_public_members( self, public_member ):
|
||||
assert isinstance( public_member, NamedUser.NamedUser ), public_member
|
||||
@@ -413,7 +414,7 @@ class Organization( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def __initAttributes( self ):
|
||||
self.__avatar_url = None
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class Permissions( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
|
||||
+2
-1
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class Plan( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import Commit
|
||||
import NamedUser
|
||||
import PullRequestMergeStatus
|
||||
@@ -164,7 +165,7 @@ class PullRequest( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PullRequestComment.PullRequestComment( self.__requester, data, completed = True )
|
||||
|
||||
def edit( self, title = DefaultValueForOptionalParameters, body = DefaultValueForOptionalParameters, state = DefaultValueForOptionalParameters ):
|
||||
@@ -188,7 +189,7 @@ class PullRequest( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def get_comment( self, id ):
|
||||
@@ -200,7 +201,7 @@ class PullRequest( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PullRequestComment.PullRequestComment( self.__requester, data, completed = True )
|
||||
|
||||
def get_comments( self ):
|
||||
@@ -211,7 +212,7 @@ class PullRequest( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
PullRequestComment.PullRequestComment,
|
||||
self.__requester,
|
||||
@@ -227,7 +228,7 @@ class PullRequest( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Commit.Commit,
|
||||
self.__requester,
|
||||
@@ -243,7 +244,7 @@ class PullRequest( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
PullRequestFile.PullRequestFile,
|
||||
self.__requester,
|
||||
@@ -273,7 +274,7 @@ class PullRequest( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PullRequestMergeStatus.PullRequestMergeStatus( self.__requester, data, completed = True )
|
||||
|
||||
def __initAttributes( self ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import NamedUser
|
||||
|
||||
class PullRequestComment( object ):
|
||||
@@ -75,7 +76,7 @@ class PullRequestComment( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def edit( self, body ):
|
||||
assert isinstance( body, ( str, unicode ) ), body
|
||||
@@ -89,7 +90,7 @@ class PullRequestComment( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def __initAttributes( self ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class PullRequestFile( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class PullRequestMergeStatus( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
|
||||
+54
-53
@@ -3,7 +3,8 @@
|
||||
|
||||
import urllib
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import Branch
|
||||
import IssueEvent
|
||||
import Label
|
||||
@@ -194,7 +195,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def compare( self, base, head ):
|
||||
assert isinstance( base, ( str, unicode ) ), base
|
||||
@@ -206,7 +207,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return data
|
||||
|
||||
def create_download( self, name, size, description = DefaultValueForOptionalParameters, content_type = DefaultValueForOptionalParameters ):
|
||||
@@ -231,7 +232,7 @@ class Repository( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Download.Download( self.__requester, data, completed = True )
|
||||
|
||||
def create_git_blob( self, content, encoding ):
|
||||
@@ -248,7 +249,7 @@ class Repository( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return GitBlob.GitBlob( self.__requester, data, completed = True )
|
||||
|
||||
def create_git_commit( self, message, tree, parents, author = DefaultValueForOptionalParameters, committer = DefaultValueForOptionalParameters ):
|
||||
@@ -270,7 +271,7 @@ class Repository( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return GitCommit.GitCommit( self.__requester, data, completed = True )
|
||||
|
||||
def create_git_ref( self, ref, sha ):
|
||||
@@ -287,7 +288,7 @@ class Repository( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return GitRef.GitRef( self.__requester, data, completed = True )
|
||||
|
||||
def create_git_tag( self, tag, message, object, type, tagger = DefaultValueForOptionalParameters ):
|
||||
@@ -310,7 +311,7 @@ class Repository( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return GitTag.GitTag( self.__requester, data, completed = True )
|
||||
|
||||
def create_git_tree( self, tree, base_tree = DefaultValueForOptionalParameters ):
|
||||
@@ -326,7 +327,7 @@ class Repository( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return GitTree.GitTree( self.__requester, data, completed = True )
|
||||
|
||||
def create_hook( self, name, config, events = DefaultValueForOptionalParameters, active = DefaultValueForOptionalParameters ):
|
||||
@@ -350,7 +351,7 @@ class Repository( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Hook.Hook( self.__requester, data, completed = True )
|
||||
|
||||
def create_issue( self, title, body = DefaultValueForOptionalParameters, assignee = DefaultValueForOptionalParameters, milestone = DefaultValueForOptionalParameters, labels = DefaultValueForOptionalParameters ):
|
||||
@@ -381,7 +382,7 @@ class Repository( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Issue.Issue( self.__requester, data, completed = True )
|
||||
|
||||
def create_key( self, title, key ):
|
||||
@@ -398,7 +399,7 @@ class Repository( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return RepositoryKey.RepositoryKey( self.__requester, data, completed = True, repoUrl = self.url )
|
||||
|
||||
def create_label( self, name, color ):
|
||||
@@ -415,7 +416,7 @@ class Repository( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Label.Label( self.__requester, data, completed = True )
|
||||
|
||||
def create_milestone( self, title, state = DefaultValueForOptionalParameters, description = DefaultValueForOptionalParameters, due_on = DefaultValueForOptionalParameters ):
|
||||
@@ -442,7 +443,7 @@ class Repository( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Milestone.Milestone( self.__requester, data, completed = True )
|
||||
|
||||
def create_pull( self, *args, **kwds ):
|
||||
@@ -469,7 +470,7 @@ class Repository( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PullRequest.PullRequest( self.__requester, data, completed = True )
|
||||
|
||||
def edit( self, name, description = DefaultValueForOptionalParameters, homepage = DefaultValueForOptionalParameters, public = DefaultValueForOptionalParameters, has_issues = DefaultValueForOptionalParameters, has_wiki = DefaultValueForOptionalParameters, has_downloads = DefaultValueForOptionalParameters ):
|
||||
@@ -508,7 +509,7 @@ class Repository( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def get_branches( self ):
|
||||
@@ -519,7 +520,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Branch.Branch,
|
||||
self.__requester,
|
||||
@@ -535,7 +536,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
NamedUser.NamedUser,
|
||||
self.__requester,
|
||||
@@ -552,7 +553,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return CommitComment.CommitComment( self.__requester, data, completed = True )
|
||||
|
||||
def get_comments( self ):
|
||||
@@ -563,7 +564,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
CommitComment.CommitComment,
|
||||
self.__requester,
|
||||
@@ -580,7 +581,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Commit.Commit( self.__requester, data, completed = True )
|
||||
|
||||
def get_commits( self, sha = DefaultValueForOptionalParameters, path = DefaultValueForOptionalParameters ):
|
||||
@@ -600,7 +601,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Commit.Commit,
|
||||
self.__requester,
|
||||
@@ -616,7 +617,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
NamedUser.NamedUser,
|
||||
self.__requester,
|
||||
@@ -633,7 +634,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Download.Download( self.__requester, data, completed = True )
|
||||
|
||||
def get_downloads( self ):
|
||||
@@ -644,7 +645,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Download.Download,
|
||||
self.__requester,
|
||||
@@ -660,7 +661,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Event.Event,
|
||||
self.__requester,
|
||||
@@ -676,7 +677,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Repository,
|
||||
self.__requester,
|
||||
@@ -693,7 +694,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return GitBlob.GitBlob( self.__requester, data, completed = True )
|
||||
|
||||
def get_git_commit( self, sha ):
|
||||
@@ -705,7 +706,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return GitCommit.GitCommit( self.__requester, data, completed = True )
|
||||
|
||||
def get_git_ref( self, ref ):
|
||||
@@ -717,7 +718,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return GitRef.GitRef( self.__requester, data, completed = True )
|
||||
|
||||
def get_git_refs( self ):
|
||||
@@ -728,7 +729,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
GitRef.GitRef,
|
||||
self.__requester,
|
||||
@@ -745,7 +746,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return GitTag.GitTag( self.__requester, data, completed = True )
|
||||
|
||||
def get_git_tree( self, sha, recursive = DefaultValueForOptionalParameters ):
|
||||
@@ -762,7 +763,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return GitTree.GitTree( self.__requester, data, completed = True )
|
||||
|
||||
def get_hook( self, id ):
|
||||
@@ -774,7 +775,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Hook.Hook( self.__requester, data, completed = True )
|
||||
|
||||
def get_hooks( self ):
|
||||
@@ -785,7 +786,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Hook.Hook,
|
||||
self.__requester,
|
||||
@@ -802,7 +803,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Issue.Issue( self.__requester, data, completed = True )
|
||||
|
||||
def get_issues( self, milestone = DefaultValueForOptionalParameters, state = DefaultValueForOptionalParameters, assignee = DefaultValueForOptionalParameters, mentioned = DefaultValueForOptionalParameters, labels = DefaultValueForOptionalParameters, sort = DefaultValueForOptionalParameters, direction = DefaultValueForOptionalParameters, since = DefaultValueForOptionalParameters ):
|
||||
@@ -846,7 +847,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Issue.Issue,
|
||||
self.__requester,
|
||||
@@ -863,7 +864,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return IssueEvent.IssueEvent( self.__requester, data, completed = True )
|
||||
|
||||
def get_issues_events( self ):
|
||||
@@ -874,7 +875,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
IssueEvent.IssueEvent,
|
||||
self.__requester,
|
||||
@@ -891,7 +892,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return RepositoryKey.RepositoryKey( self.__requester, data, completed = True, repoUrl = self.url )
|
||||
|
||||
def get_keys( self ):
|
||||
@@ -902,7 +903,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
lambda r, d, completed: RepositoryKey.RepositoryKey( r, d, completed, repoUrl = self.url ),
|
||||
self.__requester,
|
||||
@@ -919,7 +920,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Label.Label( self.__requester, data, completed = True )
|
||||
|
||||
def get_labels( self ):
|
||||
@@ -930,7 +931,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Label.Label,
|
||||
self.__requester,
|
||||
@@ -946,7 +947,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return data
|
||||
|
||||
def get_milestone( self, number ):
|
||||
@@ -958,7 +959,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return Milestone.Milestone( self.__requester, data, completed = True )
|
||||
|
||||
def get_milestones( self, state = DefaultValueForOptionalParameters, sort = DefaultValueForOptionalParameters, direction = DefaultValueForOptionalParameters ):
|
||||
@@ -982,7 +983,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Milestone.Milestone,
|
||||
self.__requester,
|
||||
@@ -998,7 +999,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Event.Event,
|
||||
self.__requester,
|
||||
@@ -1015,7 +1016,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PullRequest.PullRequest( self.__requester, data, completed = True )
|
||||
|
||||
def get_pulls( self, state = DefaultValueForOptionalParameters ):
|
||||
@@ -1031,7 +1032,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
PullRequest.PullRequest,
|
||||
self.__requester,
|
||||
@@ -1047,7 +1048,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Tag.Tag,
|
||||
self.__requester,
|
||||
@@ -1063,7 +1064,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Team.Team,
|
||||
self.__requester,
|
||||
@@ -1079,7 +1080,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
NamedUser.NamedUser,
|
||||
self.__requester,
|
||||
@@ -1106,7 +1107,7 @@ class Repository( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
@property
|
||||
def _identity( self ):
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class RepositoryKey( object ):
|
||||
def __init__( self, requester, attributes, completed, repoUrl ):
|
||||
@@ -49,7 +50,7 @@ class RepositoryKey( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def edit( self, title = DefaultValueForOptionalParameters, key = DefaultValueForOptionalParameters ):
|
||||
if title is not DefaultValueForOptionalParameters:
|
||||
@@ -68,7 +69,7 @@ class RepositoryKey( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def __initAttributes( self ):
|
||||
|
||||
+2
-1
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import Commit
|
||||
|
||||
class Tag( object ):
|
||||
|
||||
+10
-9
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import Repository
|
||||
import NamedUser
|
||||
|
||||
@@ -52,7 +53,7 @@ class Team( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def add_to_repos( self, repo ):
|
||||
assert isinstance( repo, Repository.Repository ), repo
|
||||
@@ -63,7 +64,7 @@ class Team( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def delete( self ):
|
||||
status, headers, data = self.__requester.request(
|
||||
@@ -73,7 +74,7 @@ class Team( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def edit( self, name, permission = DefaultValueForOptionalParameters ):
|
||||
assert isinstance( name, ( str, unicode ) ), name
|
||||
@@ -91,7 +92,7 @@ class Team( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def get_members( self ):
|
||||
@@ -102,7 +103,7 @@ class Team( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
NamedUser.NamedUser,
|
||||
self.__requester,
|
||||
@@ -118,7 +119,7 @@ class Team( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Repository.Repository,
|
||||
self.__requester,
|
||||
@@ -155,7 +156,7 @@ class Team( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def remove_from_repos( self, repo ):
|
||||
assert isinstance( repo, Repository.Repository ), repo
|
||||
@@ -166,7 +167,7 @@ class Team( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def __initAttributes( self ):
|
||||
self.__id = None
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
|
||||
class UserKey( object ):
|
||||
def __init__( self, requester, attributes, completed ):
|
||||
@@ -44,7 +45,7 @@ class UserKey( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def edit( self, title = DefaultValueForOptionalParameters, key = DefaultValueForOptionalParameters ):
|
||||
if title is not DefaultValueForOptionalParameters:
|
||||
@@ -63,7 +64,7 @@ class UserKey( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def __initAttributes( self ):
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
from Github import Github
|
||||
from GithubObject import GithubException
|
||||
from GithubException import GithubException
|
||||
|
||||
Reference in New Issue
Block a user