summaryrefslogtreecommitdiff
path: root/docs/gl_objects/projects.rst
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2021-11-30 08:37:56 -0800
committerJohn L. Villalovos <john@sodarock.com>2021-11-30 08:37:56 -0800
commitb3b0b5f1da5b9da9bf44eac33856ed6eadf37dd6 (patch)
tree51d07a20421b89642f263c08f5cea61ca4924e61 /docs/gl_objects/projects.rst
parent6b8067e668b6a37a19e07d84e9a0d2d2a99b4d31 (diff)
downloadgitlab-jlvillal/const_explicit.tar.gz
docs: update docs to use gitlab.const for constantsjlvillal/const_explicit
Update the docs to use gitlab.const to access constants.
Diffstat (limited to 'docs/gl_objects/projects.rst')
-rw-r--r--docs/gl_objects/projects.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/gl_objects/projects.rst b/docs/gl_objects/projects.rst
index 30d8515..10f5aaf 100644
--- a/docs/gl_objects/projects.rst
+++ b/docs/gl_objects/projects.rst
@@ -439,9 +439,9 @@ Project snippets
The snippet visibility can be defined using the following constants:
-* ``gitlab.VISIBILITY_PRIVATE``
-* ``gitlab.VISIBILITY_INTERNAL``
-* ``gitlab.VISIBILITY_PUBLIC``
+* ``gitlab.const.VISIBILITY_PRIVATE``
+* ``gitlab.const.VISIBILITY_INTERNAL``
+* ``gitlab.const.VISIBILITY_PUBLIC``
Reference
---------
@@ -480,7 +480,7 @@ Create a snippet::
'file_name': 'foo.py',
'code': 'import gitlab',
'visibility_level':
- gitlab.VISIBILITY_PRIVATE})
+ gitlab.const.VISIBILITY_PRIVATE})
Update a snippet::
@@ -546,11 +546,11 @@ Get a member of a project, including members inherited through ancestor groups::
Add a project member::
member = project.members.create({'user_id': user.id, 'access_level':
- gitlab.DEVELOPER_ACCESS})
+ gitlab.const.DEVELOPER_ACCESS})
Modify a project member (change the access level)::
- member.access_level = gitlab.MAINTAINER_ACCESS
+ member.access_level = gitlab.const.MAINTAINER_ACCESS
member.save()
Remove a member from the project team::
@@ -561,7 +561,7 @@ Remove a member from the project team::
Share/unshare the project with a group::
- project.share(group.id, gitlab.DEVELOPER_ACCESS)
+ project.share(group.id, gitlab.const.DEVELOPER_ACCESS)
project.unshare(group.id)
Project hooks