diff options
author | Rémy Coutable <remy@rymai.me> | 2017-11-07 13:58:03 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-11-07 13:58:03 +0300 |
commit | 2ec5ae21b8ab16bea83c4b00df5bf17be8ad34c6 (patch) | |
tree | 11ceb1f9c163dd43a238b49696df4918a04519fb /lib | |
parent | ce7e60f6d77f4c7ad78ec97f3d5b8dcc9b12c03d (diff) | |
parent | 9d259c2232a7a6bab344b961ef8dc9561c380c29 (diff) |
Merge branch 'add-changes-count-to-merge-requests-api' into 'master'
Add changes_count to the merge requests API
See merge request gitlab-org/gitlab-ce!15178
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 398a7906dcb..8f44a39238e 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -478,6 +478,10 @@ module API expose :subscribed do |merge_request, options| merge_request.subscribed?(options[:current_user], options[:project]) end + + expose :changes_count do |merge_request, _options| + merge_request.merge_request_diff.real_size + end end class MergeRequestChanges < MergeRequest |