Class: GitlabCodeChangeActivity
- Inherits:
-
CodeChangeActivity
- Object
- CodeChangeActivity
- GitlabCodeChangeActivity
- Defined in:
- lib/models/gitlab_code_change_activity.rb
Instance Attribute Summary
Attributes inherited from CodeChangeActivity
#author, #code_change, #created_at, #id, #is_self, #message
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id, author, is_self, message, created_at, code_change) ⇒ GitlabCodeChangeActivity
constructor
A new instance of GitlabCodeChangeActivity.
- #messages_to_ignore ⇒ Object
Methods inherited from CodeChangeActivity
Constructor Details
#initialize(id, author, is_self, message, created_at, code_change) ⇒ GitlabCodeChangeActivity
Returns a new instance of GitlabCodeChangeActivity.
5 6 7 8 9 10 11 12 |
# File 'lib/models/gitlab_code_change_activity.rb', line 5 def initialize(id, , is_self, , created_at, code_change) @id = id @author = @is_self = is_self @message = GitlabCodeChangeActivity.() @created_at = created_at @code_change = code_change end |
Class Method Details
.translate_message(message) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/models/gitlab_code_change_activity.rb', line 18 def self.() .sub(/^(added \d+ commits?).*/m, '\1') .gsub("'", "’") .gsub("\n", " ") .gsub(" ", " ") .gsub(">", "") .sub(/^\(/, "\\(") .sub(/^\[/, "\\[") .sub(/^-/, "\\-") end |
Instance Method Details
#messages_to_ignore ⇒ Object
14 15 16 |
# File 'lib/models/gitlab_code_change_activity.rb', line 14 def [/^marked the task .* as (completed|incomplete)$/, /^changed the description$/, /^resolved all threads$/] end |