Merge branch '39791-when-reopening-an-issue-the-mattermost-notification-has-no-context-to-the-issue' into 'master'
Resolve "When reopening an issue the Mattermost Notification has no context to the issue" Closes #39791 See merge request gitlab-org/gitlab-ce!15218
This commit is contained in:
commit
4338823416
3 changed files with 19 additions and 1 deletions
|
@ -39,7 +39,7 @@ module ChatMessage
|
|||
private
|
||||
|
||||
def message
|
||||
if state == 'opened'
|
||||
if opened_issue?
|
||||
"[#{project_link}] Issue #{state} by #{user_combined_name}"
|
||||
else
|
||||
"[#{project_link}] Issue #{issue_link} #{state} by #{user_combined_name}"
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Include link to issue in reopen message for Slack and Mattermost notifications
|
||||
merge_request:
|
||||
author:
|
||||
type: fixed
|
|
@ -66,6 +66,19 @@ describe ChatMessage::IssueMessage do
|
|||
expect(subject.attachments).to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
context 'reopen' do
|
||||
before do
|
||||
args[:object_attributes][:action] = 'reopen'
|
||||
args[:object_attributes][:state] = 'opened'
|
||||
end
|
||||
|
||||
it 'returns a message regarding reopening of issues' do
|
||||
expect(subject.pretext)
|
||||
.to eq('[<http://somewhere.com|project_name>] Issue <http://url.com|#100 Issue title> opened by Test User (test.user)')
|
||||
expect(subject.attachments).to be_empty
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with markdown' do
|
||||
|
|
Loading…
Reference in a new issue