Commit edb14511 authored by Maxim Rydkin's avatar Maxim Rydkin

replace `is_update?` with `update?`

parent bd406ca3
...@@ -101,9 +101,9 @@ class ChatNotificationService < Service ...@@ -101,9 +101,9 @@ class ChatNotificationService < Service
when "push", "tag_push" when "push", "tag_push"
ChatMessage::PushMessage.new(data) ChatMessage::PushMessage.new(data)
when "issue" when "issue"
ChatMessage::IssueMessage.new(data) unless is_update?(data) ChatMessage::IssueMessage.new(data) unless update?(data)
when "merge_request" when "merge_request"
ChatMessage::MergeMessage.new(data) unless is_update?(data) ChatMessage::MergeMessage.new(data) unless update?(data)
when "note" when "note"
ChatMessage::NoteMessage.new(data) ChatMessage::NoteMessage.new(data)
when "pipeline" when "pipeline"
...@@ -136,7 +136,7 @@ class ChatNotificationService < Service ...@@ -136,7 +136,7 @@ class ChatNotificationService < Service
project.web_url project.web_url
end end
def is_update?(data) def update?(data)
data[:object_attributes][:action] == 'update' data[:object_attributes][:action] == 'update'
end end
......
...@@ -85,9 +85,9 @@ class HipchatService < Service ...@@ -85,9 +85,9 @@ class HipchatService < Service
when "push", "tag_push" when "push", "tag_push"
create_push_message(data) create_push_message(data)
when "issue" when "issue"
create_issue_message(data) unless is_update?(data) create_issue_message(data) unless update?(data)
when "merge_request" when "merge_request"
create_merge_request_message(data) unless is_update?(data) create_merge_request_message(data) unless update?(data)
when "note" when "note"
create_note_message(data) create_note_message(data)
when "pipeline" when "pipeline"
...@@ -282,7 +282,7 @@ class HipchatService < Service ...@@ -282,7 +282,7 @@ class HipchatService < Service
"<a href=\"#{project_url}\">#{project_name}</a>" "<a href=\"#{project_url}\">#{project_name}</a>"
end end
def is_update?(data) def update?(data)
data[:object_attributes][:action] == 'update' data[:object_attributes][:action] == 'update'
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment