nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa7fd2f
)
lib/github: add `Comment::is_ack` to detect acknowledgments
author
Jean Privat
<jean@pryen.org>
Fri, 8 May 2015 18:20:33 +0000
(14:20 -0400)
committer
Jean Privat
<jean@pryen.org>
Fri, 8 May 2015 18:20:33 +0000
(14:20 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
lib/github/api.nit
patch
|
blob
|
history
diff --git
a/lib/github/api.nit
b/lib/github/api.nit
index
ea516fa
..
6f7c7d9
100644
(file)
--- a/
lib/github/api.nit
+++ b/
lib/github/api.nit
@@
-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.