diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-09 00:06:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-09 00:06:06 +0000 |
commit | 869182cab0867d582e469f329a6f58d13f877683 (patch) | |
tree | b98d8834894848f5ce845b7efc84681d51083695 /doc/api/protected_branches.md | |
parent | a82d0c740b338ad981321a3111b731ad78364ba1 (diff) | |
download | gitlab-ce-869182cab0867d582e469f329a6f58d13f877683.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/protected_branches.md')
-rw-r--r-- | doc/api/protected_branches.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/api/protected_branches.md b/doc/api/protected_branches.md index debf1b264f9..4a750b42f65 100644 --- a/doc/api/protected_branches.md +++ b/doc/api/protected_branches.md @@ -296,3 +296,21 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" 'https://git | --------- | ---- | -------- | ----------- | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `name` | string | yes | The name of the branch | + +## Require code owner approvals for a single branch + +Update the "code owner approval required" option for the given protected branch protected branch. + +``` +PATCH /projects/:id/protected_branches/:name +``` + +```bash +curl --request PATCH --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/5/protected_branches/feature-branch' +``` + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | +| `name` | string | yes | The name of the branch | +| `code_owner_approval_required` | boolean | no | **(PREMIUM)** Prevent pushes to this branch if it matches an item in the [`CODEOWNERS` file](../user/project/code_owners.md). (defaults: false)| |