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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-01 00:08:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-01 00:08:52 +0300
commitd5d3c03598df712550acf0c6463a61c6e7dcc19e (patch)
treed0fdf0f9cd6df46aea6ed16b6556f44055efb642 /lib/api/entities/tree_object.rb
parent0434f38ef1dce4fe640fe1e4542235746ceb943c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/entities/tree_object.rb')
-rw-r--r--lib/api/entities/tree_object.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/api/entities/tree_object.rb b/lib/api/entities/tree_object.rb
new file mode 100644
index 00000000000..e4e840ebe43
--- /dev/null
+++ b/lib/api/entities/tree_object.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ class TreeObject < Grape::Entity
+ expose :id, :name, :type, :path
+
+ expose :mode do |obj, options|
+ filemode = obj.mode
+ filemode = "0" + filemode if filemode.length < 6
+ filemode
+ end
+ end
+ end
+end