summaryrefslogtreecommitdiff
path: root/lib/api/v3
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-11-07 22:12:19 +0900
committerShinya Maeda <shinya@gitlab.com>2017-11-07 22:12:19 +0900
commitd89c18901bde510da2668e676b3bf2f1e21deef2 (patch)
tree57ddcc05bb1ca0d70bfb827d0e1ef4930c7ebf7b /lib/api/v3
parentafef38533727cf32a7be324243a25b4db5eb5498 (diff)
parent666ab4882f2c6d385c04afe269ddf5b11f795b19 (diff)
downloadgitlab-ce-d89c18901bde510da2668e676b3bf2f1e21deef2.tar.gz
Merge branch 'master' into fix/sm/31771-do-not-allow-jobs-to-be-erased-new
Diffstat (limited to 'lib/api/v3')
-rw-r--r--lib/api/v3/branches.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/api/v3/branches.rb b/lib/api/v3/branches.rb
index 69cd12de72c..b201bf77667 100644
--- a/lib/api/v3/branches.rb
+++ b/lib/api/v3/branches.rb
@@ -14,9 +14,11 @@ module API
success ::API::Entities::Branch
end
get ":id/repository/branches" do
- branches = user_project.repository.branches.sort_by(&:name)
+ repository = user_project.repository
+ branches = repository.branches.sort_by(&:name)
+ merged_branch_names = repository.merged_branch_names(branches.map(&:name))
- present branches, with: ::API::Entities::Branch, project: user_project
+ present branches, with: ::API::Entities::Branch, project: user_project, merged_branch_names: merged_branch_names
end
desc 'Delete a branch'