public PushRules updatePushRules ( Object projectIdOrPath , PushRules pushRule ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "deny_delete_tag" , pushRule . getDenyDeleteTag ( ) ) . withParam ( "member_check" , pushRule . getMemberCheck ( ) ) . withParam ( "prevent_secrets" , pushRule . getPreventSecrets ( ) ) . withParam ( "commit_message_regex" , pushRule . getCommitMessageRegex ( ) ) . withParam ( "branch_name_regex" , pushRule . getBranchNameRegex ( ) ) . withParam ( "author_email_regex" , pushRule . getAuthorEmailRegex ( ) ) . withParam ( "file_name_regex" , pushRule . getFileNameRegex ( ) ) . withParam ( "max_file_size" , pushRule . getMaxFileSize ( ) ) ; final Response response = putWithFormData ( Response . Status . OK , formData , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "push_rule" ) ; return ( response . readEntity ( PushRules . class ) ) ; }
Updates a push rule for the specified project .