From 2c7554e897356fe424f292c66cd03e0192b05167 Mon Sep 17 00:00:00 2001 From: Matt Humphrey Date: Mon, 28 Jan 2013 17:22:44 +0000 Subject: Added methods to protect and unprotect branches --- lib/api/entities.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/api/entities.rb') 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 -- cgit v1.2.1