summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-02-14 15:46:01 +0000
committerRémy Coutable <remy@rymai.me>2018-02-14 15:46:01 +0000
commit1d2a8cb75643160a0b565e41c80dd9b3b08a592d (patch)
treef252c0e69355aa7a950550875e1004a4d268bfa4 /app/services
parent3ea923a832716b87938f708eb3ecc8cebf97d963 (diff)
parenta4bb0ff8b899bf2e48b54d797997437431eaa802 (diff)
downloadgitlab-ce-1d2a8cb75643160a0b565e41c80dd9b3b08a592d.tar.gz
Merge branch '43240-external-tracker-issues-don-t-have-the-correct-closing-text-appended-to-mrs' into 'master'
Resolve "External tracker issues don't have the correct closing text appended to MRs" Closes #1 et #43240 See merge request gitlab-org/gitlab-ce!17109
Diffstat (limited to 'app/services')
-rw-r--r--app/services/merge_requests/build_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/merge_requests/build_service.rb b/app/services/merge_requests/build_service.rb
index ab6f8ea44a9..4b186d93772 100644
--- a/app/services/merge_requests/build_service.rb
+++ b/app/services/merge_requests/build_service.rb
@@ -134,7 +134,7 @@ module MergeRequests
end
def append_closes_description
- return unless issue
+ return unless issue&.to_reference.present?
closes_issue = "Closes #{issue.to_reference}"
@@ -163,7 +163,7 @@ module MergeRequests
return if merge_request.title.present?
if issue_iid.present?
- merge_request.title = "Resolve #{issue_iid}"
+ merge_request.title = "Resolve #{issue.to_reference}"
branch_title = source_branch.downcase.remove(issue_iid.downcase).titleize.humanize
merge_request.title += " \"#{branch_title}\"" if branch_title.present?
end