@@ -752,6 +752,30 @@ class KeyManager(BaseManager):
752
752
obj_cls = Key
753
753
754
754
755
+ class NotificationSettings (GitlabObject ):
756
+ _url = '/notification_settings'
757
+ _id_in_update_url = False
758
+ optionalUpdateAttrs = ['level' ,
759
+ 'notification_email' ,
760
+ 'new_note' ,
761
+ 'new_issue' ,
762
+ 'reopen_issue' ,
763
+ 'close_issue' ,
764
+ 'reassign_issue' ,
765
+ 'new_merge_request' ,
766
+ 'reopen_merge_request' ,
767
+ 'close_merge_request' ,
768
+ 'reassign_merge_request' ,
769
+ 'merge_merge_request' ]
770
+ canList = False
771
+ canCreate = False
772
+ canDelete = False
773
+
774
+
775
+ class NotificationSettingsManager (BaseManager ):
776
+ obj_cls = NotificationSettings
777
+
778
+
755
779
class GroupIssue (GitlabObject ):
756
780
_url = '/groups/%(group_id)s/issues'
757
781
canGet = 'from_list'
@@ -783,6 +807,15 @@ class GroupMemberManager(BaseManager):
783
807
obj_cls = GroupMember
784
808
785
809
810
+ class GroupNotificationSettings (NotificationSettings ):
811
+ _url = '/groups/%(group_id)s/notification_settings'
812
+ requiredUrlAttrs = ['group_id' ]
813
+
814
+
815
+ class GroupNotificationSettingsManager (BaseManager ):
816
+ obj_cls = GroupNotificationSettings
817
+
818
+
786
819
class GroupProject (GitlabObject ):
787
820
_url = '/groups/%(group_id)s/projects'
788
821
canGet = 'from_list'
@@ -835,6 +868,8 @@ class Group(GitlabObject):
835
868
managers = [
836
869
('accessrequests' , GroupAccessRequestManager , [('group_id' , 'id' )]),
837
870
('members' , GroupMemberManager , [('group_id' , 'id' )]),
871
+ ('notificationsettings' , GroupNotificationSettingsManager ,
872
+ [('group_id' , 'id' )]),
838
873
('projects' , GroupProjectManager , [('group_id' , 'id' )]),
839
874
('issues' , GroupIssueManager , [('group_id' , 'id' )])
840
875
]
@@ -1385,6 +1420,15 @@ class ProjectNoteManager(BaseManager):
1385
1420
obj_cls = ProjectNote
1386
1421
1387
1422
1423
+ class ProjectNotificationSettings (NotificationSettings ):
1424
+ _url = '/projects/%(project_id)s/notification_settings'
1425
+ requiredUrlAttrs = ['project_id' ]
1426
+
1427
+
1428
+ class ProjectNotificationSettingsManager (BaseManager ):
1429
+ obj_cls = ProjectNotificationSettings
1430
+
1431
+
1388
1432
class ProjectTagRelease (GitlabObject ):
1389
1433
_url = '/projects/%(project_id)s/repository/tags/%(tag_name)/release'
1390
1434
canDelete = False
@@ -1987,6 +2031,8 @@ class Project(GitlabObject):
1987
2031
('mergerequests' , ProjectMergeRequestManager , [('project_id' , 'id' )]),
1988
2032
('milestones' , ProjectMilestoneManager , [('project_id' , 'id' )]),
1989
2033
('notes' , ProjectNoteManager , [('project_id' , 'id' )]),
2034
+ ('notificationsettings' , ProjectNotificationSettingsManager ,
2035
+ [('project_id' , 'id' )]),
1990
2036
('pipelines' , ProjectPipelineManager , [('project_id' , 'id' )]),
1991
2037
('services' , ProjectServiceManager , [('project_id' , 'id' )]),
1992
2038
('snippets' , ProjectSnippetManager , [('project_id' , 'id' )]),
0 commit comments