summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb6
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|