Merge: Rename the visit function of minilang example.
[nit.git] / lib / github / api.nit
index ea516fa..6f7c7d9 100644 (file)
@@ -1016,6 +1016,12 @@ abstract class Comment
 
        # Comment body text.
        fun body: String do return json["body"].to_s
+
+       # Does the comment contain an acknowledgement (+1)
+       fun is_ack: Bool
+       do
+               return body.has("\\+1\\b".to_re) or body.has(":+1:") or body.has(":shipit:")
+       end
 end
 
 # A comment made on a commit.