diff --git a/github/GithubObjects.py b/github/GithubObjects.py index 117d2200..d4ac5d60 100644 --- a/github/GithubObjects.py +++ b/github/GithubObjects.py @@ -41,27 +41,8 @@ Milestone = GithubObject( ), ) -IssueComment = GithubObject( - "IssueComment", - BaseUrl( lambda obj: obj._repo._baseUrl() + "/issues/comments/" + str( obj.id ) ), - InternalSimpleAttributes( - "url", "body", "created_at", "updated_at", "id", - "_repo", - ), - InternalObjectAttribute( "user", NamedUser ), - Editable( [ "body" ], [] ), - Deletable(), -) - -IssueEvent = GithubObject( - "IssueEvent", - BaseUrl( lambda obj: obj._repo._baseUrl() + "/issues/events/" + str( obj.id ) ), - InternalSimpleAttributes( - "id", "url", "created_at", "issue", "event", "commit_id", - "_repo", - ), - InternalObjectAttribute( "actor", NamedUser ), -) +from IssueComment import IssueComment +from IssueEvent import IssueEvent Issue = GithubObject( "Issue", diff --git a/github/IssueComment.py b/github/IssueComment.py new file mode 100644 index 00000000..d22ff923 --- /dev/null +++ b/github/IssueComment.py @@ -0,0 +1,15 @@ +from GithubObject import * + +from NamedUser import NamedUser + +IssueComment = GithubObject( + "IssueComment", + BaseUrl( lambda obj: obj._repo._baseUrl() + "/issues/comments/" + str( obj.id ) ), + InternalSimpleAttributes( + "url", "body", "created_at", "updated_at", "id", + "_repo", + ), + InternalObjectAttribute( "user", NamedUser ), + Editable( [ "body" ], [] ), + Deletable(), +) diff --git a/github/IssueEvent.py b/github/IssueEvent.py new file mode 100644 index 00000000..88f0d482 --- /dev/null +++ b/github/IssueEvent.py @@ -0,0 +1,13 @@ +from GithubObject import * + +from NamedUser import NamedUser + +IssueEvent = GithubObject( + "IssueEvent", + BaseUrl( lambda obj: obj._repo._baseUrl() + "/issues/events/" + str( obj.id ) ), + InternalSimpleAttributes( + "id", "url", "created_at", "issue", "event", "commit_id", + "_repo", + ), + InternalObjectAttribute( "actor", NamedUser ), +)