diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-11-18 02:13:45 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-11-23 18:26:41 +0800 |
commit | 7df1cb528e5d977f5f18b1c82433b3c76220d6db (patch) | |
tree | 1a0910dfdf21cf1c90192c8295c41ebc57b58376 /lib/api/entities.rb | |
parent | 3e558d8dbdbf39a0241b1e72ee494362624ace38 (diff) | |
download | gitlab-ce-7df1cb528e5d977f5f18b1c82433b3c76220d6db.tar.gz |
Move identical merged branch check to merged_branch_names
Diffstat (limited to 'lib/api/entities.rb')
-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 16ae99b5c6c..acfd4a1ef4d 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| |