Added methods to protect and unprotect branches

This commit is contained in:
Matt Humphrey 2013-01-28 17:22:44 +00:00
parent df6db81e2a
commit 2c7554e897
4 changed files with 152 additions and 5 deletions

View file

@ -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