Commit 46307da1 authored by James Ramsay's avatar James Ramsay Committed by Evan Read

Document protected branch code owner approval API

Implemented by https://gitlab.com/gitlab-org/gitlab/merge_requests/16187
parent 411a9cc2
...@@ -46,7 +46,8 @@ Example response: ...@@ -46,7 +46,8 @@ Example response:
"access_level": 40, "access_level": 40,
"access_level_description": "Maintainers" "access_level_description": "Maintainers"
} }
] ],
"code_owner_approval_required": "false"
}, },
... ...
] ]
...@@ -76,7 +77,8 @@ Example response: ...@@ -76,7 +77,8 @@ Example response:
"group_id": 1234, "group_id": 1234,
"access_level_description": "Example Merge Group" "access_level_description": "Example Merge Group"
} }
] ],
"code_owner_approval_required": "false"
}, },
... ...
] ]
...@@ -115,7 +117,8 @@ Example response: ...@@ -115,7 +117,8 @@ Example response:
"access_level": 40, "access_level": 40,
"access_level_description": "Maintainers" "access_level_description": "Maintainers"
} }
] ],
"code_owner_approval_required": "false"
} }
``` ```
...@@ -142,7 +145,8 @@ Example response: ...@@ -142,7 +145,8 @@ Example response:
"group_id": 1234, "group_id": 1234,
"access_level_description": "Example Merge Group" "access_level_description": "Example Merge Group"
} }
] ],
"code_owner_approval_required": "false"
} }
``` ```
...@@ -168,7 +172,8 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitla ...@@ -168,7 +172,8 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitla
| `unprotect_access_level` | string | no | Access levels allowed to unprotect (defaults: `40`, maintainer access level) | | `unprotect_access_level` | string | no | Access levels allowed to unprotect (defaults: `40`, maintainer access level) |
| `allowed_to_push` | array | no | **(STARTER)** Array of access levels allowed to push, with each described by a hash | | `allowed_to_push` | array | no | **(STARTER)** Array of access levels allowed to push, with each described by a hash |
| `allowed_to_merge` | array | no | **(STARTER)** Array of access levels allowed to merge, with each described by a hash | | `allowed_to_merge` | array | no | **(STARTER)** Array of access levels allowed to merge, with each described by a hash |
| `allowed_to_unprotect` | array | no | **(STARTER)**Array of access levels allowed to unprotect, with each described by a hash | | `allowed_to_unprotect` | array | no | **(STARTER)** Array of access levels allowed to unprotect, with each described by a hash |
| `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) |
Example response: Example response:
...@@ -192,7 +197,8 @@ Example response: ...@@ -192,7 +197,8 @@ Example response:
"access_level": 40, "access_level": 40,
"access_level_description": "Maintainers" "access_level_description": "Maintainers"
} }
] ],
"code_owner_approval_required": "false"
} }
``` ```
...@@ -227,7 +233,8 @@ Example response: ...@@ -227,7 +233,8 @@ Example response:
"group_id": null, "group_id": null,
"access_level_description": "Maintainers" "access_level_description": "Maintainers"
} }
] ],
"code_owner_approval_required": "false"
} }
``` ```
...@@ -268,7 +275,8 @@ Example response: ...@@ -268,7 +275,8 @@ Example response:
"group_id": null, "group_id": null,
"access_level_description": "Maintainers" "access_level_description": "Maintainers"
} }
] ],
"code_owner_approval_required": "false"
} }
``` ```
......
---
title: Docs for protected branch code owner approval API
merge_request: 17132
author:
type: other
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