diff options
author | Eugenia Grieff <egrieff@gitlab.com> | 2019-09-20 14:23:21 +0100 |
---|---|---|
committer | Eugenia Grieff <egrieff@gitlab.com> | 2019-10-23 19:22:11 +0100 |
commit | 8684d67accb1c34c146e143ba7496c5732586553 (patch) | |
tree | c95aa1e2e06940db9657e0270817b40fd5ae0f7f /app | |
parent | 7f0a4a64d0bc59b184ae3ee578adb6ebd3c48bf7 (diff) | |
download | gitlab-ce-8684d67accb1c34c146e143ba7496c5732586553.tar.gz |
Add milestone and label note types to cross refs
- Include new types in SystemNoteMetadata
- Add Label and Milestone reference_pattern to
Mentionable::ReferenceRegexes to be checked for cross references
Diffstat (limited to 'app')
-rw-r--r-- | app/models/concerns/mentionable/reference_regexes.rb | 4 | ||||
-rw-r--r-- | app/models/system_note_metadata.rb | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/app/models/concerns/mentionable/reference_regexes.rb b/app/models/concerns/mentionable/reference_regexes.rb index fec31cd262b..f44a674b3c9 100644 --- a/app/models/concerns/mentionable/reference_regexes.rb +++ b/app/models/concerns/mentionable/reference_regexes.rb @@ -13,7 +13,9 @@ module Mentionable def self.other_patterns [ Commit.reference_pattern, - MergeRequest.reference_pattern + MergeRequest.reference_pattern, + Label.reference_pattern, + Milestone.reference_pattern ] end diff --git a/app/models/system_note_metadata.rb b/app/models/system_note_metadata.rb index 11cbeb60bba..5a44ee7211b 100644 --- a/app/models/system_note_metadata.rb +++ b/app/models/system_note_metadata.rb @@ -10,6 +10,7 @@ class SystemNoteMetadata < ApplicationRecord commit cross_reference close duplicate moved merge + label milestone ].freeze ICON_TYPES = %w[ |