diff options
author | Paul Slaughter <pslaughter@gitlab.com> | 2018-09-26 11:28:50 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-09-26 11:28:50 +0300 |
commit | f3901842493c58faba71ad0812bf3102790a1b9f (patch) | |
tree | f30d0f4c67e80ec8fd591fa43b0b9b59998423c7 /app/serializers/diffs_entity.rb | |
parent | c7fcb01b8adf988e2e10e63979507d99bedba163 (diff) |
Resolve "Commit details are not displayed when reviewing an MR commit by commit"
Diffstat (limited to 'app/serializers/diffs_entity.rb')
-rw-r--r-- | app/serializers/diffs_entity.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/serializers/diffs_entity.rb b/app/serializers/diffs_entity.rb index 878cc5290bd..00dc55fc004 100644 --- a/app/serializers/diffs_entity.rb +++ b/app/serializers/diffs_entity.rb @@ -15,8 +15,11 @@ class DiffsEntity < Grape::Entity merge_request&.target_branch end - expose :commit do |diffs| - options[:commit] + expose :commit do |diffs, options| + CommitEntity.represent options[:commit], options.merge( + type: :full, + commit_url_params: { merge_request_iid: merge_request&.iid } + ) end expose :merge_request_diff, using: MergeRequestDiffEntity do |diffs| |