Skip to content

Commit

Permalink
Brief branch protection notes
Browse files Browse the repository at this point in the history
You can pass developers_can_push and developers_can_merge to the protect function. Handy!
  • Loading branch information
vilhelmen committed Sep 15, 2016
1 parent ddba752 commit 8a560c6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/gl_objects/branches.rst
Expand Up @@ -41,3 +41,10 @@ Protect/unprotect a repository branch:
.. literalinclude:: branches.py
:start-after: # protect
:end-before: # end protect

.. note::

By default, developers will not be able to push or merge into
protected branches. This can be changed by passing ``developers_can_push``
or ``developers_can_merge`` like so:
``branch.protect(developers_can_push=False, developers_can_merge=True)``

0 comments on commit 8a560c6

Please sign in to comment.