public NotificationSettings updateGlobalNotificationSettings ( NotificationSettings settings ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "level" , settings . getLevel ( ) ) . withParam ( "email" , settings . getEmail ( ) ) ; Events events = settings . getEvents ( ) ; if ( events != null ) { formData . withParam ( "new_note" , events . getNewNote ( ) ) . withParam ( "new_issuee" , events . getNewIssue ( ) ) . withParam ( "reopen_issuee" , events . getReopenIssue ( ) ) . withParam ( "close_issuee" , events . getCloseIssue ( ) ) . withParam ( "reassign_issuee" , events . getReassignIssue ( ) ) . withParam ( "new_merge_requeste" , events . getNewMergeRequest ( ) ) . withParam ( "reopen_merge_requeste" , events . getReopenMergeRequest ( ) ) . withParam ( "close_merge_requeste" , events . getCloseMergeRequest ( ) ) . withParam ( "reassign_merge_requeste" , events . getReassignMergeRequest ( ) ) . withParam ( "merge_merge_requeste" , events . getMergeMergeRequest ( ) ) . withParam ( "failed_pipelinee" , events . getFailedPipeline ( ) ) . withParam ( "success_pipelinee" , events . getSuccessPipeline ( ) ) ; } Response response = put ( Response . Status . OK , formData . asMap ( ) , "notification_settings" ) ; return ( response . readEntity ( NotificationSettings . class ) ) ; }
Update the global notification settings .