lib/github: introduce `Issue::is_pull_request` method
authorAlexandre Terrasa <alexandre@moz-code.org>
Fri, 16 Oct 2015 15:10:49 +0000 (11:10 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Fri, 16 Oct 2015 15:16:38 +0000 (11:16 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/github/api.nit

index 6b1935e..7e7400c 100644 (file)
@@ -909,6 +909,9 @@ class Issue
                        json["closed_by"] = user.json
                end
        end
+
+       # Is this issue linked to a pull request?
+       fun is_pull_request: Bool do return json.has_key("pull_request")
 end
 
 # A Github pull request.