For single line git commit messages, the close quote should be on the same line as the open quote

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Julian Zinn 2016-11-04 12:36:37 -07:00 committed by Rémy Coutable
parent 0139896b37
commit 549242c620
3 changed files with 7 additions and 2 deletions

View file

@ -220,7 +220,7 @@ class JiraService < IssueTrackerService
entity_title = data[:entity][:title] entity_title = data[:entity][:title]
project_name = data[:project][:name] project_name = data[:project][:name]
message = "[#{user_name}|#{user_url}] mentioned this issue in [a #{entity_name} of #{project_name}|#{entity_url}]:\n'#{entity_title}'" message = "[#{user_name}|#{user_url}] mentioned this issue in [a #{entity_name} of #{project_name}|#{entity_url}]:\n'#{entity_title.chomp}'"
link_title = "GitLab: Mentioned on #{entity_name} - #{entity_title}" link_title = "GitLab: Mentioned on #{entity_name} - #{entity_title}"
link_props = build_remote_link_props(url: entity_url, title: link_title) link_props = build_remote_link_props(url: entity_url, title: link_title)

View file

@ -0,0 +1,5 @@
---
title: For single line git commit messages, the close quote should be on the same
line as the open quote
merge_request:
author:

View file

@ -694,7 +694,7 @@ describe SystemNoteService, services: true do
describe "existing reference" do describe "existing reference" do
before do before do
message = "[#{author.name}|http://localhost/#{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}'" message = "[#{author.name}|http://localhost/#{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.chomp}'"
allow_any_instance_of(JIRA::Resource::Issue).to receive(:comments).and_return([OpenStruct.new(body: message)]) allow_any_instance_of(JIRA::Resource::Issue).to receive(:comments).and_return([OpenStruct.new(body: message)])
end end