Skip to content
Snippets Groups Projects
Commit edb14511 authored by Maxim Rydkin's avatar Maxim Rydkin
Browse files

replace `is_update?` with `update?`

parent bd406ca3
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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"
Loading
Loading
@@ -136,7 +136,7 @@ class ChatNotificationService < Service
project.web_url
end
 
def is_update?(data)
def update?(data)
data[:object_attributes][:action] == 'update'
end
 
Loading
Loading
Loading
Loading
@@ -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"
Loading
Loading
@@ -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
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment