diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-11-23 15:16:37 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-11-23 15:16:37 +0000 |
commit | dbf97574dc611309bd60eac292fec3f029f34348 (patch) | |
tree | 5195f231bc31044a751eb4840a10038c0ef61051 /lib/api | |
parent | deda88f9422e67913d9e13557d386d8a9ad92e0a (diff) | |
parent | d6fcdec52f795f59526c5908349e918d499da2b3 (diff) | |
download | gitlab-ce-dbf97574dc611309bd60eac292fec3f029f34348.tar.gz |
Merge branch '39887-move-identical-check-to-merged-branches' into 'master'
Move identical merged branch check to merged_branch_names
Closes #39887
See merge request gitlab-org/gitlab-ce!15464
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 e45c87e4f4f..7d5d68c8f14 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -242,7 +242,11 @@ module API end expose :merged do |repo_branch, options| - options[:project].repository.merged_to_root_ref?(repo_branch, options[:merged_branch_names]) + if options[:merged_branch_names] + options[:merged_branch_names].include?(repo_branch.name) + else + options[:project].repository.merged_to_root_ref?(repo_branch) + end end expose :protected do |repo_branch, options| |