Skip to content

Commit 590c41a

Browse files
author
Gauvain Pocentek
committed
Improve the protect branch creation example
Closes #536
1 parent 4cf8118 commit 590c41a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/gl_objects/protected_branches.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ Get a single protected branch::
2929

3030
Create a protected branch::
3131

32-
p_branch = project.protectedbranches.create({'name': '*-stable'})
32+
p_branch = project.protectedbranches.create({
33+
'name': '*-stable',
34+
'merge_access_level': gitlab.DEVELOPER_ACCESS,
35+
'push_access_level': gitlab.MASTER_ACCESS
36+
})
3337

3438
Delete a protected branch::
3539

0 commit comments

Comments
 (0)