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>2019-10-16 18:06:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 18:06:17 +0300
commit00c78fb814d7ce00989ac04edd6cdaa3239da284 (patch)
treef04920f08eb4e481ce27bd1d96862676dff735dc /app/services
parentd2ffc30fd583e86d4122bb5061098f4f3ca7b3f1 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services')
-rw-r--r--app/services/system_notes/issuables_service.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/services/system_notes/issuables_service.rb b/app/services/system_notes/issuables_service.rb
index 4377f437798..6fffd2ed4bf 100644
--- a/app/services/system_notes/issuables_service.rb
+++ b/app/services/system_notes/issuables_service.rb
@@ -288,18 +288,16 @@ module SystemNotes
"#{self.class.cross_reference_note_prefix}#{gfm_reference}"
end
- # rubocop: disable CodeReuse/ActiveRecord
def notes_for_mentioner(mentioner, noteable, notes)
if mentioner.is_a?(Commit)
text = "#{self.class.cross_reference_note_prefix}%#{mentioner.to_reference(nil)}"
- notes.where('(note LIKE ? OR note LIKE ?)', text, text.capitalize)
+ notes.like_note_or_capitalized_note(text)
else
gfm_reference = mentioner.gfm_reference(noteable.project || noteable.group)
text = cross_reference_note_content(gfm_reference)
- notes.where(note: [text, text.capitalize])
+ notes.for_note_or_capitalized_note(text)
end
end
- # rubocop: enable CodeReuse/ActiveRecord
def self.cross_reference_note_prefix
'mentioned in '