You can define notification settings globally, for groups and for projects. Valid levels are defined as constants:
NOTIFICATION_LEVEL_DISABLEDNOTIFICATION_LEVEL_PARTICIPATINGNOTIFICATION_LEVEL_WATCHNOTIFICATION_LEVEL_GLOBALNOTIFICATION_LEVEL_MENTIONNOTIFICATION_LEVEL_CUSTOM
You get access to fine-grained settings if you use the
NOTIFICATION_LEVEL_CUSTOM level.
- Object classes: :class:`gitlab.objects.NotificationSettings` (global), :class:`gitlab.objects.GroupNotificationSettings` (groups) and :class:`gitlab.objects.ProjectNotificationSettings` (projects)
- Manager objects: :attr:`gitlab.Gitlab.notificationsettings` (global), :attr:`gitlab.objects.Group.notificationsettings` (groups) and :attr:`gitlab.objects.Project.notificationsettings` (projects)
Get the settings:
.. literalinclude:: notifications.py :start-after: # get :end-before: # end get
Update the settings:
.. literalinclude:: notifications.py :start-after: # update :end-before: # end update