diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-10-07 01:05:27 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-10-19 18:46:04 +0300 |
commit | 8e4301d982ce28d80e711865ac294a98ddce3ec6 (patch) | |
tree | 1f6d01b142ca952f3cd3098336fbb0762fe0a8dc /lib/banzai/filter/issue_reference_filter.rb | |
parent | f560849941dcb4408350c6c24034f845d3986782 (diff) |
Prevent wrong markdown on issue ids when project has Jira service activated
Diffstat (limited to 'lib/banzai/filter/issue_reference_filter.rb')
-rw-r--r-- | lib/banzai/filter/issue_reference_filter.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/banzai/filter/issue_reference_filter.rb b/lib/banzai/filter/issue_reference_filter.rb index 54c5f9a71a4..4d1bc687696 100644 --- a/lib/banzai/filter/issue_reference_filter.rb +++ b/lib/banzai/filter/issue_reference_filter.rb @@ -4,6 +4,10 @@ module Banzai # issues that do not exist are ignored. # # This filter supports cross-project references. + # + # When external issues tracker like Jira is activated we should not + # use issue reference pattern, but we should still be able + # to reference issues from other GitLab projects. class IssueReferenceFilter < AbstractReferenceFilter self.reference_type = :issue @@ -11,6 +15,10 @@ module Banzai Issue end + def uses_reference_pattern? + context[:project].default_issues_tracker? + end + def find_object(project, iid) issues_per_project[project][iid] end |