On note creation create cross reference in external tracker or internal system.

This commit is contained in:
Marin Jankovski
2015-02-06 10:31:00 -08:00
parent 46b1664b22
commit 768bb0a5de
+5 -1
View File
@@ -15,7 +15,11 @@ module Notes
# Create a cross-reference note if this Note contains GFM that names an
# issue, merge request, or commit.
note.references.each do |mentioned|
Note.create_cross_reference_note(mentioned, note.noteable, note.author, note.project)
if mentioned.is_a?(ExternalIssue)
note.project.issues_tracker.create_cross_reference_note
else
Note.create_cross_reference_note(mentioned, note.noteable, note.author, note.project)
end
end
end
end