Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-11-23 18:16:37 +0300
committerDouwe Maan <douwe@gitlab.com>2017-11-23 18:16:37 +0300
commitdbf97574dc611309bd60eac292fec3f029f34348 (patch)
tree5195f231bc31044a751eb4840a10038c0ef61051 /lib/api/entities.rb
parentdeda88f9422e67913d9e13557d386d8a9ad92e0a (diff)
parentd6fcdec52f795f59526c5908349e918d499da2b3 (diff)
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/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|