redef fun react_event(game, event) do
if not event isa IssueCommentEvent then return
# FIXME use a more precise way to locate reviews
- if event.comment.has_ok_review then
+ if event.comment.is_ack then
var player = event.comment.user.player(game)
var a = new_achievement(game)
player.unlock_achievement(a, event)
# Rewards player for review comments.
#
- # Actuallty we look if the comment contains the string `"+1"`.
- #
# TODO only give nitcoins if reviewers < 2
redef fun react_player_event(r, game) do
- # FIXME use a more precise way to locate reviews
- if comment.body.has("\\+1\\b".to_re) then
+ if comment.is_ack then
react_player_review(r, game)
end
end
game.stats.inc("comments")
player.stats.inc("comments")
# FIXME use a more precise way to locate reviews
- if comment.has_ok_review then
+ if comment.is_ack then
game.stats.inc("reviews")
player.stats.inc("reviews")
end
end
end
end
-
-redef class IssueComment
- # Does this comment contain a "+1"?
- fun has_ok_review: Bool do return body.has("\\+1\\b".to_re)
-end