diff options
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 80e2954a344..3f228300e26 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -33,6 +33,11 @@ module Gitlab class RepoObject < Grape::Entity expose :name, :commit + expose :protected do |repo, options| + if options[:project] + options[:project].protected_branch? repo.name + end + end end class RepoCommit < Grape::Entity |