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>2020-04-02 12:08:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 12:08:14 +0300
commitade18c9d68d5a2e6c6e28ef7e9d3add3b3491ace (patch)
treecf4154332fc95283f58cccb1383e43b40485d91d /app/serializers/paginated_diff_entity.rb
parentba836d98593d68d8d6c22c540e31c8031a786bd8 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers/paginated_diff_entity.rb')
-rw-r--r--app/serializers/paginated_diff_entity.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/serializers/paginated_diff_entity.rb b/app/serializers/paginated_diff_entity.rb
index 622da926c69..a31c9d70d4b 100644
--- a/app/serializers/paginated_diff_entity.rb
+++ b/app/serializers/paginated_diff_entity.rb
@@ -10,7 +10,11 @@ class PaginatedDiffEntity < Grape::Entity
expose :diff_files do |diffs, options|
submodule_links = Gitlab::SubmoduleLinks.new(merge_request.project.repository)
- DiffFileEntity.represent(diffs.diff_files, options.merge(submodule_links: submodule_links))
+ code_navigation_path =
+ Gitlab::CodeNavigationPath.new(merge_request.project, diffs.diff_refs.head_sha)
+
+ DiffFileEntity.represent(diffs.diff_files,
+ options.merge(submodule_links: submodule_links, code_navigation_path: code_navigation_path))
end
expose :pagination do