Merge pull request #2839 from m4tthumphrey/protected-branches-api

Added methods to protect and unprotect branches in from the API
This commit is contained in:
Dmitriy Zaporozhets 2013-01-31 10:44:20 -08:00
commit 5857a7a9ce
4 changed files with 152 additions and 5 deletions

View file

@ -34,6 +34,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