Skip to content
Snippets Groups Projects
Commit 1e759816 authored by Andrew Kumanyaev's avatar Andrew Kumanyaev
Browse files

Update markdown reference to external issues

1. Issue may be not only in jira.
2. Rewrite method for support different external issue trackers
parent 550f2337
No related branches found
No related tags found
No related merge requests found
Loading
@@ -189,8 +189,12 @@ module Gitlab
Loading
@@ -189,8 +189,12 @@ module Gitlab
   
link_to("##{identifier}", url, options) link_to("##{identifier}", url, options)
end end
elsif project.issues_tracker == 'jira' else
reference_jira_issue(identifier, project) config = Gitlab.config
external_issue_tracker = config.issues_tracker[project.issues_tracker]
if external_issue_tracker.present?
reference_external_issue(identifier, external_issue_tracker, project)
end
end end
end end
   
Loading
@@ -226,9 +230,9 @@ module Gitlab
Loading
@@ -226,9 +230,9 @@ module Gitlab
end end
end end
   
def reference_jira_issue(identifier, project = @project) def reference_external_issue(identifier, issue_tracker, project = @project)
url = url_for_issue(identifier) url = url_for_issue(identifier)
title = Gitlab.config.issues_tracker[project.issues_tracker]["title"] title = issue_tracker['title']
   
options = html_options.merge( options = html_options.merge(
title: "Issue in #{title}", title: "Issue in #{title}",
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment