summaryrefslogtreecommitdiff
path: root/app/serializers/paginated_diff_entity.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 09:08:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 09:08:14 +0000
commitade18c9d68d5a2e6c6e28ef7e9d3add3b3491ace (patch)
treecf4154332fc95283f58cccb1383e43b40485d91d /app/serializers/paginated_diff_entity.rb
parentba836d98593d68d8d6c22c540e31c8031a786bd8 (diff)
downloadgitlab-ce-ade18c9d68d5a2e6c6e28ef7e9d3add3b3491ace.tar.gz
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