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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-01 03:07:13 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-01 03:07:13 +0300
commitba557e8fea7c8a825a702ab154fa1574c4d2998a (patch)
tree9c252889816492ea0ebc5c7f86b1f5cd4a2f3620 /lib/gitlab/reference_extractor.rb
parentd88cacce3f205151867ab3f9297f10cdae4a7025 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/reference_extractor.rb')
-rw-r--r--lib/gitlab/reference_extractor.rb5
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)