summaryrefslogtreecommitdiff
path: root/docs/gl_objects/notifications.rst
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-12-01 01:04:53 +0100
committerGitHub <noreply@github.com>2021-12-01 01:04:53 +0100
commit8d76826fa64460e504acc5924f859f8dbc246b42 (patch)
tree083fefada982c795e2415092794db429abb0c184 /docs/gl_objects/notifications.rst
parent5a1678f43184bd459132102cc13cf8426fe0449d (diff)
parent86ab04e54ea4175f10053decfad5086cda7aa024 (diff)
downloadgitlab-master.tar.gz
Merge pull request #1723 from python-gitlab/jlvillal/dead_mastermaster
Close-out `master` branch
Diffstat (limited to 'docs/gl_objects/notifications.rst')
-rw-r--r--docs/gl_objects/notifications.rst59
1 files changed, 0 insertions, 59 deletions
diff --git a/docs/gl_objects/notifications.rst b/docs/gl_objects/notifications.rst
deleted file mode 100644
index ab0287f..0000000
--- a/docs/gl_objects/notifications.rst
+++ /dev/null
@@ -1,59 +0,0 @@
-#####################
-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``
-
-You get access to fine-grained settings if you use the
-``NOTIFICATION_LEVEL_CUSTOM`` level.
-
-Reference
----------
-
-* v4 API:
-
- + :class:`gitlab.v4.objects.NotificationSettings`
- + :class:`gitlab.v4.objects.NotificationSettingsManager`
- + :attr:`gitlab.Gitlab.notificationsettings`
- + :class:`gitlab.v4.objects.GroupNotificationSettings`
- + :class:`gitlab.v4.objects.GroupNotificationSettingsManager`
- + :attr:`gitlab.v4.objects.Group.notificationsettings`
- + :class:`gitlab.v4.objects.ProjectNotificationSettings`
- + :class:`gitlab.v4.objects.ProjectNotificationSettingsManager`
- + :attr:`gitlab.v4.objects.Project.notificationsettings`
-
-* GitLab API: https://docs.gitlab.com/ce/api/notification_settings.html
-
-Examples
---------
-
-Get the notifications settings::
-
- # global settings
- settings = gl.notificationsettings.get()
- # for a group
- settings = gl.groups.get(group_id).notificationsettings.get()
- # for a project
- settings = gl.projects.get(project_id).notificationsettings.get()
-
-Update the notifications settings::
-
- # use a predefined level
- settings.level = gitlab.NOTIFICATION_LEVEL_WATCH
-
- # create a custom setup
- settings.level = gitlab.NOTIFICATION_LEVEL_CUSTOM
- settings.save() # will create additional attributes, but not mandatory
-
- settings.new_merge_request = True
- settings.new_issue = True
- settings.new_note = True
- settings.save()