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
49c07a41
Commit
49c07a41
authored
Sep 20, 2018
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix activity titles for MRs in chat notification services
parent
8c219294
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
app/models/project_services/chat_message/merge_message.rb
app/models/project_services/chat_message/merge_message.rb
+1
-1
changelogs/unreleased/fix-chat-notification-service-for-ee.yml
...elogs/unreleased/fix-chat-notification-service-for-ee.yml
+5
-0
spec/models/project_services/chat_message/merge_message_spec.rb
...odels/project_services/chat_message/merge_message_spec.rb
+17
-0
No files found.
app/models/project_services/chat_message/merge_message.rb
View file @
49c07a41
...
@@ -26,7 +26,7 @@ module ChatMessage
...
@@ -26,7 +26,7 @@ module ChatMessage
def
activity
def
activity
{
{
title:
"Merge Request
#{
state
}
by
#{
user_combined_name
}
"
,
title:
"Merge Request
#{
state
_or_action_text
}
by
#{
user_combined_name
}
"
,
subtitle:
"in
#{
project_link
}
"
,
subtitle:
"in
#{
project_link
}
"
,
text:
merge_request_link
,
text:
merge_request_link
,
image:
user_avatar
image:
user_avatar
...
...
changelogs/unreleased/fix-chat-notification-service-for-ee.yml
0 → 100644
View file @
49c07a41
---
title
:
Fix activity titles for MRs in chat notification services
merge_request
:
21834
author
:
type
:
fixed
spec/models/project_services/chat_message/merge_message_spec.rb
View file @
49c07a41
...
@@ -27,6 +27,23 @@ describe ChatMessage::MergeMessage do
...
@@ -27,6 +27,23 @@ describe ChatMessage::MergeMessage do
}
}
end
end
# Integration point in EE
context
'when state is overridden'
do
it
'respects the overridden state'
do
allow
(
subject
).
to
receive
(
:state_or_action_text
)
{
'devoured'
}
aggregate_failures
do
expect
(
subject
.
summary
).
not_to
include
(
'opened'
)
expect
(
subject
.
summary
).
to
include
(
'devoured'
)
activity_title
=
subject
.
activity
[
:title
]
expect
(
activity_title
).
not_to
include
(
'opened'
)
expect
(
activity_title
).
to
include
(
'devoured'
)
end
end
end
context
'without markdown'
do
context
'without markdown'
do
let
(
:color
)
{
'#345'
}
let
(
:color
)
{
'#345'
}
...
...
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