diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2016-07-19 10:36:18 +0200 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2016-07-19 10:44:52 +0200 |
commit | ab9ea51dd2556d8cffe747986162cdf77c52f64d (patch) | |
tree | d52eb5b14067406aa7c0eaf40b53f84688192641 /lib/api/entities.rb | |
parent | 8f4e0d9d55b5d9b01d6c2de00091c68d41e7bf27 (diff) | |
download | gitlab-ce-api-dev-can-push.tar.gz |
API: Expose 'developers_can_merge' for branchesapi-dev-can-push
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index e4ae5adafd6..d6fed1a1eed 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -136,6 +136,12 @@ module API options[:project].developers_can_push_to_protected_branch? repo_obj.name end end + + expose :developers_can_merge do |repo_obj, options| + if options[:project] + options[:project].developers_can_merge_to_protected_branch? repo_obj.name + end + end end class RepoTreeObject < Grape::Entity |