Merge: Safe call operator
[nit.git] / lib / github / events.nit
index b8c004a..952ee62 100644 (file)
 module events
 
 import api
-intrude import json::serialization
+intrude import json
 
 # Github event stub.
 class GithubEvent
-       super Jsonable
        serialize
 
        # Event ID from Github.
@@ -186,12 +185,12 @@ class PullRequestEvent
 end
 
 # Triggered when a comment is created on a pull request diff.
-class PullRequestReviewCommentEvent
+class PullRequestPullCommentEvent
        super GithubEvent
        serialize
 
        # The `Comment` itself.
-       var comment: ReviewComment is writable
+       var comment: PullComment is writable
 
        # `PullRequest` the `comment` belongs to.
        var pull: PullRequest is writable
@@ -269,7 +268,7 @@ redef class GithubDeserializer
                else if json_object.has_key("action") and json_object.has_key("number") then
                        return "PullRequestEvent"
                else if json_object.has_key("action") and json_object.has_key("pull") and json_object.has_key("comment") then
-                       return "PullRequestReviewCommentEvent"
+                       return "PullRequestPullCommentEvent"
                else if json_object.has_key("head_commit") and json_object.has_key("commits") then
                        return "PushEvent"
                else if json_object.has_key("action") and json_object.has_key("branches") then