Commit 1e1b8c1c authored by Amy Qualls's avatar Amy Qualls

Merge branch '337346-docs-reference-to-closed-issue-needs-to-be-updated' into 'master'

Improve Code Owners documentation

See merge request gitlab-org/gitlab!74398
parents 6b02c8d9 7904f008
......@@ -177,12 +177,16 @@ entries under **Database**. The entries defined under the sections **Documentati
### Make a Code Owners section optional
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/232995) in GitLab Premium 13.8 behind a feature flag, enabled by default.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/53227) in GitLab 13.9.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/232995) in GitLab Premium 13.8.
You can make a section optional, so that approval from the Code Owners in that section is optional.
You can designate optional sections in your Code Owners file. Prepend the
section name with the caret `^` character to treat the entire section as optional.
Optional sections enable you to designate responsible parties for various parts
of your codebase, but not require approval from them. This approach provides
a more relaxed policy for parts of your project that are frequently updated,
but don't require stringent reviews.
Put a caret `^` character before the Code Owners section name. For example:
In this example, the `[Go]` section is optional:
```plaintext
[Documentation]
......@@ -204,8 +208,12 @@ If a section is duplicated in the file, and one of them is marked as optional an
Optional sections in the `CODEOWNERS` file are treated as optional only
when changes are submitted by using merge requests. If a change is submitted directly
to the protected branch, approval from Code Owners is still required, even if the
section is marked as optional. [An issue exists](https://gitlab.com/gitlab-org/gitlab/-/issues/297638)
to allow direct pushes to the protected branch for sections marked as optional.
section is marked as optional.
### Allowed to Push
The Code Owner approval and protected branch features do not apply to users who
are **Allowed to push**.
## Example `CODEOWNERS` file
......
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