Skip to content

Commit 8a560c6

Browse files
committed
Brief branch protection notes
You can pass developers_can_push and developers_can_merge to the protect function. Handy!
1 parent ddba752 commit 8a560c6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/gl_objects/branches.rst

+7
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,10 @@ Protect/unprotect a repository branch:
4141
.. literalinclude:: branches.py
4242
:start-after: # protect
4343
:end-before: # end protect
44+
45+
.. note::
46+
47+
By default, developers will not be able to push or merge into
48+
protected branches. This can be changed by passing ``developers_can_push``
49+
or ``developers_can_merge`` like so:
50+
``branch.protect(developers_can_push=False, developers_can_merge=True)``

0 commit comments

Comments
 (0)