Merge remote-tracking branch 'origin/issue_5854'
This commit is contained in:
commit
954b98377f
|
@ -19,6 +19,7 @@ v 8.5.4 (unreleased)
|
||||||
v 8.5.3
|
v 8.5.3
|
||||||
- Flush repository caches before renaming projects
|
- Flush repository caches before renaming projects
|
||||||
- Sort starred projects on dashboard based on last activity by default
|
- Sort starred projects on dashboard based on last activity by default
|
||||||
|
- Show commit message in JIRA mention comment
|
||||||
|
|
||||||
v 8.5.2
|
v 8.5.2
|
||||||
- Fix sidebar overlapping content when screen width was below 1200px
|
- Fix sidebar overlapping content when screen width was below 1200px
|
||||||
|
|
|
@ -108,7 +108,8 @@ class JiraService < IssueTrackerService
|
||||||
},
|
},
|
||||||
entity: {
|
entity: {
|
||||||
name: noteable_name.humanize.downcase,
|
name: noteable_name.humanize.downcase,
|
||||||
url: entity_url
|
url: entity_url,
|
||||||
|
title: noteable.title
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,10 +197,11 @@ class JiraService < IssueTrackerService
|
||||||
user_url = data[:user][:url]
|
user_url = data[:user][:url]
|
||||||
entity_name = data[:entity][:name]
|
entity_name = data[:entity][:name]
|
||||||
entity_url = data[:entity][:url]
|
entity_url = data[:entity][:url]
|
||||||
|
entity_title = data[:entity][:title]
|
||||||
project_name = data[:project][:name]
|
project_name = data[:project][:name]
|
||||||
|
|
||||||
message = {
|
message = {
|
||||||
body: "[#{user_name}|#{user_url}] mentioned this issue in [a #{entity_name} of #{project_name}|#{entity_url}]."
|
body: %Q{[#{user_name}|#{user_url}] mentioned this issue in [a #{entity_name} of #{project_name}|#{entity_url}]:\n'#{entity_title}'}
|
||||||
}
|
}
|
||||||
|
|
||||||
unless existing_comment?(issue_name, message[:body])
|
unless existing_comment?(issue_name, message[:body])
|
||||||
|
|
|
@ -474,8 +474,8 @@ describe SystemNoteService, services: true do
|
||||||
|
|
||||||
describe "existing reference" do
|
describe "existing reference" do
|
||||||
before do
|
before do
|
||||||
message = "[#{author.name}|http://localhost/u/#{author.username}] mentioned this issue in [a commit of #{project.path_with_namespace}|http://localhost/#{project.path_with_namespace}/commit/#{commit.id}]."
|
message = %Q{[#{author.name}|http://localhost/u/#{author.username}] mentioned this issue in [a commit of #{project.path_with_namespace}|http://localhost/#{project.path_with_namespace}/commit/#{commit.id}]:\\n'#{commit.title}'}
|
||||||
WebMock.stub_request(:get, jira_api_comment_url).to_return(body: "{\"comments\":[{\"body\":\"#{message}\"}]}")
|
WebMock.stub_request(:get, jira_api_comment_url).to_return(body: %Q({"comments":[{"body":"#{message}"}]}))
|
||||||
end
|
end
|
||||||
|
|
||||||
subject { described_class.cross_reference(jira_issue, commit, author) }
|
subject { described_class.cross_reference(jira_issue, commit, author) }
|
||||||
|
|
Loading…
Reference in New Issue