diff options
Diffstat (limited to 'lib/gitlab/reference_extractor.rb')
-rw-r--r-- | lib/gitlab/reference_extractor.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/gitlab/reference_extractor.rb b/lib/gitlab/reference_extractor.rb index c5798bec0d7..540394f04bd 100644 --- a/lib/gitlab/reference_extractor.rb +++ b/lib/gitlab/reference_extractor.rb @@ -4,7 +4,8 @@ module Gitlab # Extract possible GFM references from an arbitrary String for further processing. class ReferenceExtractor < Banzai::ReferenceExtractor REFERABLES = %i(user issue label milestone mentioned_user mentioned_group mentioned_project - merge_request snippet commit commit_range directly_addressed_user epic iteration vulnerability).freeze + merge_request snippet commit commit_range directly_addressed_user epic iteration vulnerability + alert).freeze attr_accessor :project, :current_user, :author def initialize(project, current_user = nil) @@ -71,7 +72,7 @@ module Gitlab return @pattern if @pattern patterns = REFERABLES.map do |type| - Banzai::ReferenceParser[type].reference_type.to_s.classify.constantize.try(:reference_pattern) + Banzai::ReferenceParser[type].reference_class.try(:reference_pattern) end.uniq @pattern = Regexp.union(patterns.compact) |