Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew Blessing <drew@gitlab.com>2015-12-18 01:08:14 +0300
committerDrew Blessing <drew@gitlab.com>2015-12-18 23:19:48 +0300
commitf177aaa5fa789654dc440d6ec4ae3546544c1401 (patch)
tree709b259ea7903da9ac28e5393cc29d0780a6c63a /lib/gitlab/reference_extractor.rb
parent27859f7ed9e1efe98b8386844d0a7e69fd58277a (diff)
Backport JIRA service
Diffstat (limited to 'lib/gitlab/reference_extractor.rb')
-rw-r--r--lib/gitlab/reference_extractor.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/gitlab/reference_extractor.rb b/lib/gitlab/reference_extractor.rb
index 42f7c26f3c4..0a70d21b1ce 100644
--- a/lib/gitlab/reference_extractor.rb
+++ b/lib/gitlab/reference_extractor.rb
@@ -18,10 +18,20 @@ module Gitlab
super(text, context.merge(project: project))
end
- %i(user label issue merge_request snippet commit commit_range).each do |type|
+ %i(user label merge_request snippet commit commit_range).each do |type|
define_method("#{type}s") do
@references[type] ||= references(type, project: project, current_user: current_user)
end
end
+
+ def issues
+ options = { project: project, current_user: current_user }
+
+ if project && project.jira_tracker?
+ @references[:external_issue] ||= references(:external_issue, options)
+ else
+ @references[:issue] ||= references(:issue, options)
+ end
+ end
end
end