Commit edb14511 authored by Maxim Rydkin's avatar Maxim Rydkin

replace `is_update?` with `update?`

parent bd406ca3
......@@ -101,9 +101,9 @@ class ChatNotificationService < Service
when "push", "tag_push"
ChatMessage::PushMessage.new(data)
when "issue"
ChatMessage::IssueMessage.new(data) unless is_update?(data)
ChatMessage::IssueMessage.new(data) unless update?(data)
when "merge_request"
ChatMessage::MergeMessage.new(data) unless is_update?(data)
ChatMessage::MergeMessage.new(data) unless update?(data)
when "note"
ChatMessage::NoteMessage.new(data)
when "pipeline"
......@@ -136,7 +136,7 @@ class ChatNotificationService < Service
project.web_url
end
def is_update?(data)
def update?(data)
data[:object_attributes][:action] == 'update'
end
......
......@@ -85,9 +85,9 @@ class HipchatService < Service
when "push", "tag_push"
create_push_message(data)
when "issue"
create_issue_message(data) unless is_update?(data)
create_issue_message(data) unless update?(data)
when "merge_request"
create_merge_request_message(data) unless is_update?(data)
create_merge_request_message(data) unless update?(data)
when "note"
create_note_message(data)
when "pipeline"
......@@ -282,7 +282,7 @@ class HipchatService < Service
"<a href=\"#{project_url}\">#{project_name}</a>"
end
def is_update?(data)
def update?(data)
data[:object_attributes][:action] == 'update'
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