diff options
author | Rémy Coutable <remy@rymai.me> | 2016-11-30 17:40:39 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-11-30 17:40:39 +0000 |
commit | 467b44cbbfd70c627dca0a8f57966bc5ba0999c3 (patch) | |
tree | 9a7bbf3078d6e9661df7f1a20706a489b0af9920 /lib/api | |
parent | d48787a23370056770b634785a4185ed2a4fbadd (diff) | |
parent | 2ce66c071fc7ab2b8ca881223321a3927ec7d61e (diff) | |
download | gitlab-ce-467b44cbbfd70c627dca0a8f57966bc5ba0999c3.tar.gz |
Merge branch 'api-branch-status' into 'master'
API: Expose branch status
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/24938
See merge request !7796
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/entities.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index fdb19558c1c..d5dfb8d00be 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -141,8 +141,12 @@ module API options[:project].repository.commit(repo_branch.dereferenced_target) end + expose :merged do |repo_branch, options| + options[:project].repository.merged_to_root_ref?(repo_branch.name) + end + expose :protected do |repo_branch, options| - options[:project].protected_branch? repo_branch.name + options[:project].protected_branch?(repo_branch.name) end expose :developers_can_push do |repo_branch, options| |