Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
edb14511
Commit
edb14511
authored
Aug 24, 2017
by
Maxim Rydkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace `is_update?` with `update?`
parent
bd406ca3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
app/models/project_services/chat_notification_service.rb
app/models/project_services/chat_notification_service.rb
+3
-3
app/models/project_services/hipchat_service.rb
app/models/project_services/hipchat_service.rb
+3
-3
No files found.
app/models/project_services/chat_notification_service.rb
View file @
edb14511
...
...
@@ -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
...
...
app/models/project_services/hipchat_service.rb
View file @
edb14511
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment