Commit 4d8f28f6 authored by Maikel's avatar Maikel Committed by Nick Thomas

Document the negative commit message push rule for the API.

parent 2523672b
...@@ -1631,6 +1631,7 @@ GET /projects/:id/push_rule ...@@ -1631,6 +1631,7 @@ GET /projects/:id/push_rule
"id": 1, "id": 1,
"project_id": 3, "project_id": 3,
"commit_message_regex": "Fixes \d+\..*", "commit_message_regex": "Fixes \d+\..*",
"commit_message_negative_regex": "ssh\:\/\/",
"branch_name_regex": "", "branch_name_regex": "",
"deny_delete_tag": false, "deny_delete_tag": false,
"created_at": "2012-10-12T17:04:47Z", "created_at": "2012-10-12T17:04:47Z",
...@@ -1663,18 +1664,19 @@ Adds a push rule to a specified project. ...@@ -1663,18 +1664,19 @@ Adds a push rule to a specified project.
POST /projects/:id/push_rule POST /projects/:id/push_rule
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| -------------------------------------- | -------------- | -------- | ----------- | | --------------------------------------------- | -------------- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME | | `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
| `deny_delete_tag` **(STARTER)** | boolean | no | Deny deleting a tag | | `deny_delete_tag` **(STARTER)** | boolean | no | Deny deleting a tag |
| `member_check` **(STARTER)** | boolean | no | Restrict commits by author (email) to existing GitLab users | | `member_check` **(STARTER)** | boolean | no | Restrict commits by author (email) to existing GitLab users |
| `prevent_secrets` **(STARTER)** | boolean | no | GitLab will reject any files that are likely to contain secrets | | `prevent_secrets` **(STARTER)** | boolean | no | GitLab will reject any files that are likely to contain secrets |
| `commit_message_regex` **(STARTER)** | string | no | All commit messages must match this, e.g. `Fixed \d+\..*` | | `commit_message_regex` **(STARTER)** | string | no | All commit messages must match this, e.g. `Fixed \d+\..*` |
| `branch_name_regex` **(STARTER)** | string | no | All branch names must match this, e.g. `(feature|hotfix)\/*` | | `commit_message_negative_regex` **(STARTER)** | string | no | No commit message is allowed to match this, e.g. `ssh\:\/\/` |
| `author_email_regex` **(STARTER)** | string | no | All commit author emails must match this, e.g. `@my-company.com$` | | `branch_name_regex` **(STARTER)** | string | no | All branch names must match this, e.g. `(feature|hotfix)\/*` |
| `file_name_regex` **(STARTER)** | string | no | All commited filenames must **not** match this, e.g. `(jar|exe)$` | | `author_email_regex` **(STARTER)** | string | no | All commit author emails must match this, e.g. `@my-company.com$` |
| `max_file_size` **(STARTER)** | integer | no | Maximum file size (MB) | | `file_name_regex` **(STARTER)** | string | no | All commited filenames must **not** match this, e.g. `(jar|exe)$` |
| `commit_committer_check` **(PREMIUM)** | boolean | no | Users can only push commits to this repository that were committed with one of their own verified emails. | | `max_file_size` **(STARTER)** | integer | no | Maximum file size (MB) |
| `commit_committer_check` **(PREMIUM)** | boolean | no | Users can only push commits to this repository that were committed with one of their own verified emails. |
### Edit project push rule ### Edit project push rule
...@@ -1684,18 +1686,19 @@ Edits a push rule for a specified project. ...@@ -1684,18 +1686,19 @@ Edits a push rule for a specified project.
PUT /projects/:id/push_rule PUT /projects/:id/push_rule
``` ```
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| -------------------------------------- | -------------- | -------- | ----------- | | --------------------------------------------- | -------------- | -------- | ----------- |
| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME | | `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME |
| `deny_delete_tag` **(STARTER)** | boolean | no | Deny deleting a tag | | `deny_delete_tag` **(STARTER)** | boolean | no | Deny deleting a tag |
| `member_check` **(STARTER)** | boolean | no | Restrict commits by author (email) to existing GitLab users | | `member_check` **(STARTER)** | boolean | no | Restrict commits by author (email) to existing GitLab users |
| `prevent_secrets` **(STARTER)** | boolean | no | GitLab will reject any files that are likely to contain secrets | | `prevent_secrets` **(STARTER)** | boolean | no | GitLab will reject any files that are likely to contain secrets |
| `commit_message_regex` **(STARTER)** | string | no | All commit messages must match this, e.g. `Fixed \d+\..*` | | `commit_message_regex` **(STARTER)** | string | no | All commit messages must match this, e.g. `Fixed \d+\..*` |
| `branch_name_regex` **(STARTER)** | string | no | All branch names must match this, e.g. `(feature|hotfix)\/*` | | `commit_message_negative_regex` **(STARTER)** | string | no | No commit message is allowed to match this, e.g. `ssh\:\/\/` |
| `author_email_regex` **(STARTER)** | string | no | All commit author emails must match this, e.g. `@my-company.com$` | | `branch_name_regex` **(STARTER)** | string | no | All branch names must match this, e.g. `(feature|hotfix)\/*` |
| `file_name_regex` **(STARTER)** | string | no | All commited filenames must **not** match this, e.g. `(jar|exe)$` | | `author_email_regex` **(STARTER)** | string | no | All commit author emails must match this, e.g. `@my-company.com$` |
| `max_file_size` **(STARTER)** | integer | no | Maximum file size (MB) | | `file_name_regex` **(STARTER)** | string | no | All commited filenames must **not** match this, e.g. `(jar|exe)$` |
| `commit_committer_check` **(PREMIUM)** | boolean | no | Users can only push commits to this repository that were committed with one of their own verified emails. | | `max_file_size` **(STARTER)** | integer | no | Maximum file size (MB) |
| `commit_committer_check` **(PREMIUM)** | boolean | no | Users can only push commits to this repository that were committed with one of their own verified emails. |
### Delete project push rule ### Delete project push rule
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment