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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-02-29 11:49:22 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-03-17 09:39:15 +0300
commit9124ebce982981b74ae644793a680b2b6060ce21 (patch)
tree5b9a1246f33e5e8a0369011691b42dab57499783 /app/services/issues/move_service.rb
parent3c493c24c70f7c8dc8e1f3bcf29e18d1ef0944a7 (diff)
Use internal reference extractor in banzai unfold pipeline
Diffstat (limited to 'app/services/issues/move_service.rb')
-rw-r--r--app/services/issues/move_service.rb26
1 files changed, 9 insertions, 17 deletions
diff --git a/app/services/issues/move_service.rb b/app/services/issues/move_service.rb
index cf935f30ce3..a9448af4699 100644
--- a/app/services/issues/move_service.rb
+++ b/app/services/issues/move_service.rb
@@ -72,30 +72,22 @@ module Issues
end
def add_moved_from_note
- SystemNoteService.noteable_moved(:from, @issue_new, @project_new, @issue_old, @current_user)
+ SystemNoteService.noteable_moved(:from, @issue_new, @project_new,
+ @issue_old, @current_user)
end
def add_moved_to_note
- SystemNoteService.noteable_moved(:to, @issue_old, @project_old, @issue_new, @current_user)
+ SystemNoteService.noteable_moved(:to, @issue_old, @project_old,
+ @issue_new, @current_user)
end
def rewrite_references(noteable)
- references = noteable.all_references
- new_content = noteable_content(noteable).dup
- cross_project_mentionables = [:issues, :merge_requests, :milestones,
- :snippets, :commits, :commit_ranges]
+ content = noteable_content(noteable).dup
+ context = { pipeline: :reference_unfold,
+ project: @project_old, new_project: @project_new }
- cross_project_mentionables.each do |type|
- referables = references.public_send(type)
-
- context = { objects: referables, project: @project_new,
- pipeline: :reference_unfold }
-
- new_content = Banzai.render_result(new_content, context)
- new_content = new_content[:output].to_s
- end
-
- new_content
+ new_content = Banzai.render_result(content, context)
+ new_content[:output].to_s
end
def noteable_content(noteable)