BigW Consortium Gitlab

Commit 1e759816 by Andrew Kumanyaev

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
......@@ -189,8 +189,12 @@ module Gitlab
link_to("##{identifier}", url, options)
end
elsif project.issues_tracker == 'jira'
reference_jira_issue(identifier, project)
else
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
......@@ -226,9 +230,9 @@ module Gitlab
end
end
def reference_jira_issue(identifier, project = @project)
def reference_external_issue(identifier, issue_tracker, project = @project)
url = url_for_issue(identifier)
title = Gitlab.config.issues_tracker[project.issues_tracker]["title"]
title = issue_tracker['title']
options = html_options.merge(
title: "Issue in #{title}",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment