Added methods to protect and unprotect branches
This commit is contained in:
parent
df6db81e2a
commit
2c7554e897
4 changed files with 152 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue