class CodeChangeActivity
Attributes
code_change[R]
created_at[R]
id[R]
is_self[R]
message[R]
Public Instance Methods
messages_to_ignore()
click to toggle source
# File lib/models/code_change_activity.rb, line 20 def messages_to_ignore raise NotImplementedError end
notified()
click to toggle source
# File lib/models/code_change_activity.rb, line 7 def notified if id Rubiclifier::DB.execute("INSERT INTO code_change_activity_notified (id, notified_at) VALUES('#{id}', CURRENT_TIMESTAMP);") end end
should_notify?()
click to toggle source
# File lib/models/code_change_activity.rb, line 13 def should_notify? !is_self && (code_change.activity_from_self_at && created_at > code_change.activity_from_self_at && code_change.includes_self || message == "just opened merge request") && messages_to_ignore.none? { |m| message.match(m) } && !Rubiclifier::DB.query_single_row("SELECT id FROM code_change_activity_notified WHERE id = '#{id}'") end