github/api: uniformize `load_issue_event` implementation with other services.
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 3 Feb 2015 21:22:59 +0000 (22:22 +0100)
committerAlexandre Terrasa <alexandre@moz-code.org>
Tue, 3 Feb 2015 21:22:59 +0000 (22:22 +0100)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/github/api.nit

index 2655ae3..782d598 100644 (file)
@@ -266,9 +266,7 @@ class GithubAPI
        #     assert event.issue.number == 945
        fun load_issue_event(repo: Repo, id: Int): nullable IssueEvent do
                var event = new IssueEvent(self, repo, id)
-               event.load_from_github
-               if was_error then return null
-               return event
+               return event.load_from_github
        end
 
        # Get the Github commit comment with `id`.