mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
IssueComment
This commit is contained in:
@@ -142,6 +142,18 @@ Milestone = GithubObject(
|
||||
ListAttribute( "labels", Label, ListGetable( [], [], lambda obj, attributes: dict( itertools.chain( attributes.iteritems(), { "_repo": obj._repo }.iteritems() ) ) ) ),
|
||||
)
|
||||
|
||||
IssueComment = GithubObject(
|
||||
"IssueComment",
|
||||
BaseUrl( lambda obj: obj._repo._baseUrl + "/issues/comment" + str( obj.id ) ),
|
||||
BasicAttributes(
|
||||
"url", "body", "created_at", "updated_at", "id",
|
||||
"_repo", ### Ugly hack
|
||||
),
|
||||
ComplexAttribute( "user", NamedUser ),
|
||||
Editable( [ "body" ], [] ),
|
||||
Deletable(),
|
||||
)
|
||||
|
||||
Issue = GithubObject(
|
||||
"Issue",
|
||||
BaseUrl( lambda obj: obj._repo._baseUrl + "/issues/" + str( obj.number ) ),
|
||||
@@ -162,6 +174,11 @@ Issue = GithubObject(
|
||||
ListDeletable(),
|
||||
ElementRemovable(),
|
||||
),
|
||||
ListAttribute( "comments", IssueComment,
|
||||
ListGetable( [], [], lambda obj, attributes: dict( itertools.chain( attributes.iteritems(), { "_repo": obj._repo }.iteritems() ) ) ),
|
||||
ElementGetable( "comment", lambda repo, id: { "_repo": repo, "id": id } ),
|
||||
ElementCreatable( "comment", [ "body" ], [], lambda obj, attributes: dict( itertools.chain( attributes.iteritems(), { "_repo": obj._repo }.iteritems() ) ) ),
|
||||
),
|
||||
)
|
||||
|
||||
__modifyAttributesForObjectsReferingRepo = lambda obj, attributes: dict( itertools.chain( attributes.iteritems(), { "_repo": obj }.iteritems() ) )
|
||||
|
||||
Reference in New Issue
Block a user