mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Move classes around
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from GithubObject import *
|
||||
|
||||
from GitCommit import GitCommit
|
||||
from NamedUser import NamedUser
|
||||
from CommitComment import CommitComment
|
||||
|
||||
__modifyAttributesForObjectsReferingReferedRepo = { "_repo": lambda obj: obj._repo }
|
||||
|
||||
Commit = GithubObject(
|
||||
"Commit",
|
||||
BaseUrl( lambda obj: obj._repo._baseUrl() + "/commits/" + str( obj.sha ) ),
|
||||
InternalSimpleAttributes(
|
||||
"sha", "url",
|
||||
"parents",
|
||||
"stats",
|
||||
"files",
|
||||
"_repo",
|
||||
),
|
||||
InternalObjectAttribute( "commit", GitCommit ),
|
||||
InternalObjectAttribute( "author", NamedUser ),
|
||||
InternalObjectAttribute( "committer", NamedUser ),
|
||||
ExternalListOfObjects( "comments", "comment", CommitComment,
|
||||
ListGetable( [], [], __modifyAttributesForObjectsReferingReferedRepo ),
|
||||
ElementCreatable( [ "body" ], [ "commit_id", "line", "path", "position" ], __modifyAttributesForObjectsReferingReferedRepo ),
|
||||
),
|
||||
)
|
||||
Reference in New Issue
Block a user