diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-08-25 12:59:21 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-08-25 12:59:21 -0500 |
commit | bbd9a6fe405d0df1c7c9ad09b7c3ff6a0201953f (patch) | |
tree | ebe142b4a13ff41691fdc75b348e718c3989a2df /lib/api/entities.rb | |
parent | 532489dc045d6f0c6a215889be3f1d39097d1c83 (diff) | |
parent | a943ccf10ecf2af3331927cb83268fbc70f43634 (diff) | |
download | gitlab-ce-bbd9a6fe405d0df1c7c9ad09b7c3ff6a0201953f.tar.gz |
Merge branch 'dz-merge-request-version'
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index aaeb3d4800b..cbb324dd06d 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -250,6 +250,19 @@ module API end end + class MergeRequestDiff < Grape::Entity + expose :id, :head_commit_sha, :base_commit_sha, :start_commit_sha, + :created_at, :merge_request_id, :state, :real_size + end + + class MergeRequestDiffFull < MergeRequestDiff + expose :commits, using: Entities::RepoCommit + + expose :diffs, using: Entities::RepoDiff do |compare, _| + compare.raw_diffs(all_diffs: true).to_a + end + end + class SSHKey < Grape::Entity expose :id, :title, :key, :created_at end |