FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Improve the protect branch creation example · python-gitlab/python-gitlab@590c41a · GitHub

Repository navigation

Commit 590c41a

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

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎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)

Back | FazBrowse Home | New Git URL