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:
commit
5857a7a9ce
4 changed files with 152 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue