Commit c06bc4e3 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis Committed by Bob Van Landuyt

Refactor code owners docs

parent dbde2b33
# Code owners # Code owners
> [Introduced][introduced-mr] in [Gitlab Starter][ee] 11.3 > [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6916)
in [Gitlab Starter](https://about.gitlab.com/pricing/) 11.3.
You can use a `CODEOWNERS` file to specify users that are responsible You can use a `CODEOWNERS` file to specify users that are responsible
for a certain part of the code in a repository. for certain files in a repository.
The codeowners file can be added to the root of the repository, inside You can choose and add the `CODEOWNERS` file in three places:
the `.gitlab/` or the `docs/` folder.
The `CODEOWNERS` is scoped to a branch. This means that with the - to the root directory of the repository
introduction of new files, the developer adding the new code can - inside the `.gitlab/` directory
specify themselves as code owner. Before the new code gets merged to - inside the `docs/` directory
master.
The `CODEOWNERS` file is scoped to a branch, which means that with the
introduction of new files, the person adding the new content can
specify themselves as a code owner, all before the new changes
get merged to the default branch.
When a file matches multiple entries in the `CODEOWNERS` file,
the users from all entries are displayed on the blob page of
the given file.
## The syntax of a code owners file ## The syntax of a code owners file
...@@ -53,7 +61,7 @@ CODEOWNERS @multiple @owners @tab-separated ...@@ -53,7 +61,7 @@ CODEOWNERS @multiple @owners @tab-separated
# users. Everything else will be ignored. For example this will # users. Everything else will be ignored. For example this will
# specify `@legal` and a user with email `janedoe@gitlab.com` as the # specify `@legal` and a user with email `janedoe@gitlab.com` as the
# owner for the LICENSE file # owner for the LICENSE file
LICENSE @legal this does not match janedoe@gitlab.com LICENSE @legal this_does_not_match janedoe@gitlab.com
# Ending a path in a `/` will specify the code owners for every file # Ending a path in a `/` will specify the code owners for every file
# nested in that directory, on any level # nested in that directory, on any level
...@@ -72,10 +80,6 @@ lib/ @lib-owner ...@@ -72,10 +80,6 @@ lib/ @lib-owner
# repository # repository
/config/ @config-owner /config/ @config-owner
# If the path contains spaces, these need to be escaped like this: # If the path contains spaces, these need to be escaped like this:
path\ with\ spaces/ @space-owner path\ with\ spaces/ @space-owner
``` ```
[introduced-mr]: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6916
[ee]: https://about.gitlab.com/pricing/
...@@ -87,8 +87,7 @@ website with GitLab Pages ...@@ -87,8 +87,7 @@ website with GitLab Pages
your code blocks, overriding GitLab's default choice of language your code blocks, overriding GitLab's default choice of language
- [Badges](badges.md): Badges for the project overview - [Badges](badges.md): Badges for the project overview
- [Maven packages](maven_packages.md): Your private Maven repository in GitLab - [Maven packages](maven_packages.md): Your private Maven repository in GitLab
- [Code owners](code_owners.md): Specify code owners for certain files - [Code owners](code_owners.md): Specify code owners for certain files **[STARTER]**
**[STARTER]**
### Project's integrations ### Project's integrations
......
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