diff options
author | Natalia Tepluhina <ntepluhina@gitlab.com> | 2019-01-16 16:18:10 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2019-01-16 16:18:10 +0300 |
commit | 7407dfdc2010bce121567393f0f223b3d09cbaf0 (patch) | |
tree | 1348844a691bcfae01fefe921fe675702bb1daf6 /app/serializers/merge_request_diff_entity.rb | |
parent | eec16ee28c7b377101ab3d5f81835cd8c2020981 (diff) |
Resolve "In Merge Request diff screen, master is not a hyperlink"
Diffstat (limited to 'app/serializers/merge_request_diff_entity.rb')
-rw-r--r-- | app/serializers/merge_request_diff_entity.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/serializers/merge_request_diff_entity.rb b/app/serializers/merge_request_diff_entity.rb index 433bfe60474..7e3053e5881 100644 --- a/app/serializers/merge_request_diff_entity.rb +++ b/app/serializers/merge_request_diff_entity.rb @@ -24,6 +24,14 @@ class MergeRequestDiffEntity < Grape::Entity short_sha(merge_request_diff.head_commit_sha) end + expose :base_version_path do |merge_request_diff| + project = merge_request.target_project + + next unless project + + merge_request_version_path(project, merge_request, merge_request_diff) + end + expose :version_path do |merge_request_diff| start_sha = options[:start_sha] project = merge_request.target_project |