diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2017-09-02 16:37:43 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2017-09-02 16:37:43 +0200 |
commit | c99e399443819024e2e44cbd437091a39641ae68 (patch) | |
tree | c658432a57a087494df5557f4b975ce0af05f2ee /docs/gl_objects | |
parent | fcccfbda6342659ae4e040901bfd0ddaeb4541d5 (diff) | |
download | gitlab-c99e399443819024e2e44cbd437091a39641ae68.tar.gz |
Add support for protected branches
This feature appeared in gitlab 9.5.
Fixes #299
Diffstat (limited to 'docs/gl_objects')
-rw-r--r-- | docs/gl_objects/branches.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/gl_objects/branches.py b/docs/gl_objects/branches.py index b80dfc0..431e09d 100644 --- a/docs/gl_objects/branches.py +++ b/docs/gl_objects/branches.py @@ -26,3 +26,21 @@ branch.delete() branch.protect() branch.unprotect() # end protect + +# p_branch list +p_branches = project.protectedbranches.list() +# end p_branch list + +# p_branch get +p_branch = project.protectedbranches.get('master') +# end p_branch get + +# p_branch create +p_branch = project.protectedbranches.create({'name': '*-stable'}) +# end p_branch create + +# p_branch delete +project.protectedbranches.delete('*-stable') +# or +p_branch.delete() +# end p_branch delete |