diff options
author | John L. Villalovos <john@sodarock.com> | 2021-11-30 08:37:56 -0800 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2021-11-30 08:37:56 -0800 |
commit | b3b0b5f1da5b9da9bf44eac33856ed6eadf37dd6 (patch) | |
tree | 51d07a20421b89642f263c08f5cea61ca4924e61 /docs/gl_objects/notifications.rst | |
parent | 6b8067e668b6a37a19e07d84e9a0d2d2a99b4d31 (diff) | |
download | gitlab-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/notifications.rst')
-rw-r--r-- | docs/gl_objects/notifications.rst | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/gl_objects/notifications.rst b/docs/gl_objects/notifications.rst index ab0287f..8d8d9c0 100644 --- a/docs/gl_objects/notifications.rst +++ b/docs/gl_objects/notifications.rst @@ -5,12 +5,12 @@ Notification settings You can define notification settings globally, for groups and for projects. Valid levels are defined as constants: -* ``gitlab.NOTIFICATION_LEVEL_DISABLED`` -* ``gitlab.NOTIFICATION_LEVEL_PARTICIPATING`` -* ``gitlab.NOTIFICATION_LEVEL_WATCH`` -* ``gitlab.NOTIFICATION_LEVEL_GLOBAL`` -* ``gitlab.NOTIFICATION_LEVEL_MENTION`` -* ``gitlab.NOTIFICATION_LEVEL_CUSTOM`` +* ``gitlab.const.NOTIFICATION_LEVEL_DISABLED`` +* ``gitlab.const.NOTIFICATION_LEVEL_PARTICIPATING`` +* ``gitlab.const.NOTIFICATION_LEVEL_WATCH`` +* ``gitlab.const.NOTIFICATION_LEVEL_GLOBAL`` +* ``gitlab.const.NOTIFICATION_LEVEL_MENTION`` +* ``gitlab.const.NOTIFICATION_LEVEL_CUSTOM`` You get access to fine-grained settings if you use the ``NOTIFICATION_LEVEL_CUSTOM`` level. @@ -47,10 +47,10 @@ Get the notifications settings:: Update the notifications settings:: # use a predefined level - settings.level = gitlab.NOTIFICATION_LEVEL_WATCH + settings.level = gitlab.const.NOTIFICATION_LEVEL_WATCH # create a custom setup - settings.level = gitlab.NOTIFICATION_LEVEL_CUSTOM + settings.level = gitlab.const.NOTIFICATION_LEVEL_CUSTOM settings.save() # will create additional attributes, but not mandatory settings.new_merge_request = True |