Update push rules of a project
Updates the push rules for a specified project.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Request Body
Section titled “ Request Body ”object
Deny deleting a tag
Example
trueRestrict commits by author (email) to existing GitLab users
Example
trueGitLab will reject any files that are likely to contain secrets
Example
trueAll commit messages must match this
Example
Fixed \d+\..*No commit message is allowed to match this
Example
ssh\:\/\/All branches names must match this
Example
(feature|hotfix)\/.*All commit author emails must match this
Example
@my-company.com$All committed filenames must not match this
Example
(jar|exe)$Maximum file size (MB)
Example
1024Users can only push commits to this repository if the committer email is one of their own verified emails.
Example
trueUsers can only push commits to this repository if the commit author name is consistent with their GitLab account name.
Example
trueReject commit when it’s not signed.
Example
trueReject commit when it’s not DCO certified.
Example
trueResponses
Section titled “ Responses ”OK
object
Example
{ "id": 2, "project_id": 3, "created_at": "2020-08-31T15:53:00.073Z", "commit_message_regex": "Fixed \\d+\\..*", "commit_message_negative_regex": "ssh\\:\\/\\/", "branch_name_regex": "(feature|hotfix)\\/.*", "deny_delete_tag": true, "member_check": true, "prevent_secrets": true, "author_email_regex": "@my-company.com$", "file_name_regex": "(jar|exe)$", "max_file_size": 1024, "commit_committer_check": true, "commit_committer_name_check": true, "reject_unsigned_commits": true, "reject_non_dco_commits": true}Validation error
Not found
Unprocessable entity