summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2018-02-09 17:46:41 +0100
committerRobert Schilling <rschilling@student.tugraz.at>2018-02-09 17:46:41 +0100
commit922d156a5e0412a12662df94e03479f7ed015f7b (patch)
treeb36694ea6070ec44bf95a1d02937cda291f87e22 /lib/api/entities.rb
parent2a970e02912a75962ce559ba49252a4696bbfbea (diff)
downloadgitlab-ce-922d156a5e0412a12662df94e03479f7ed015f7b.tar.gz
Separate branch and tag names
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 054c04bbd98..c7a817877f0 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -277,8 +277,12 @@ module API
end
class BasicRef < Grape::Entity
- expose :name do |ref, options|
- ref
+ expose :branch_name, if: lambda { |ref, options| ref[1] } do |ref, options|
+ ref[0]
+ end
+
+ expose :tag_name, if: lambda { |ref, options| !ref[1] } do |ref, options|
+ ref[0]
end
end