diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 21:08:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 21:08:05 +0300 |
commit | 184c2ced0761bd8dd7032619d16d3983fed7944a (patch) | |
tree | cc82b32ee7c1797509da3cf384617e4ffa2e1733 /doc/user/project | |
parent | 238d22c07218adf2b8f3db630ee8b74ca6f29df5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/user/project')
-rw-r--r-- | doc/user/project/code_owners.md | 23 | ||||
-rwxr-xr-x | doc/user/project/img/code_owners_approval_new_protected_branch_v12_4.png | bin | 0 -> 141341 bytes | |||
-rwxr-xr-x | doc/user/project/img/code_owners_approval_protected_branch_v12_4.png | bin | 0 -> 16195 bytes | |||
-rw-r--r-- | doc/user/project/img/code_owners_mr_widget_v12_4.png | bin | 0 -> 27875 bytes | |||
-rwxr-xr-x | doc/user/project/merge_requests/img/mr_approvals_by_code_owners_v12_4.png | bin | 0 -> 26902 bytes | |||
-rw-r--r-- | doc/user/project/merge_requests/merge_request_approvals.md | 47 | ||||
-rw-r--r-- | doc/user/project/pipelines/settings.md | 8 | ||||
-rw-r--r-- | doc/user/project/protected_branches.md | 43 | ||||
-rw-r--r-- | doc/user/project/releases/img/custom_notifications_new_release_v12_4.png | bin | 0 -> 65959 bytes | |||
-rw-r--r-- | doc/user/project/releases/index.md | 12 |
10 files changed, 91 insertions, 42 deletions
diff --git a/doc/user/project/code_owners.md b/doc/user/project/code_owners.md index 0d422612f02..476f513480c 100644 --- a/doc/user/project/code_owners.md +++ b/doc/user/project/code_owners.md @@ -1,8 +1,13 @@ +--- +type: reference +--- + # Code Owners **(STARTER)** > - [Introduced](https://gitlab.com/gitlab-org/gitlab/merge_requests/6916) in [GitLab Starter](https://about.gitlab.com/pricing/) 11.3. > - [Support for group namespaces](https://gitlab.com/gitlab-org/gitlab-foss/issues/53182) added in GitLab Starter 12.1. +> - Code Owners for Merge Request approvals was [introduced](https://gitlab.com/gitlab-org/gitlab/issues/4418) in [GitLab Premium](https://about.gitlab.com/pricing/) 11.9. You can use a `CODEOWNERS` file to specify users or [shared groups](members/share_project_with_groups.md) @@ -10,9 +15,9 @@ that are responsible for certain files in a repository. You can choose and add the `CODEOWNERS` file in three places: -- to the root directory of the repository -- inside the `.gitlab/` directory -- inside the `docs/` directory +- To the root directory of the repository +- Inside the `.gitlab/` directory +- Inside the `docs/` directory The `CODEOWNERS` file is scoped to a branch, which means that with the introduction of new files, the person adding the new content can @@ -23,6 +28,18 @@ 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. +## Approvals by Code Owners + +Once you've set Code Owners to a project, you can configure it to +receive approvals: + +- As [merge request eligible approvers](merge_requests/merge_request_approvals.md#code-owners-as-eligible-approvers-starter). **(STARTER)** +- As required approvers for [protected branches](protected_branches.md#protected-branches-approval-by-code-owners-premium). **(PREMIUM)** + +Once set, Code Owners are displayed in merge requests widgets: + +![MR widget - Code Owners](img/code_owners_mr_widget_v12_4.png) + ## The syntax of Code Owners files Files can be specified using the same kind of patterns you would use diff --git a/doc/user/project/img/code_owners_approval_new_protected_branch_v12_4.png b/doc/user/project/img/code_owners_approval_new_protected_branch_v12_4.png Binary files differnew file mode 100755 index 00000000000..f813b60dcd9 --- /dev/null +++ b/doc/user/project/img/code_owners_approval_new_protected_branch_v12_4.png diff --git a/doc/user/project/img/code_owners_approval_protected_branch_v12_4.png b/doc/user/project/img/code_owners_approval_protected_branch_v12_4.png Binary files differnew file mode 100755 index 00000000000..59da6874d14 --- /dev/null +++ b/doc/user/project/img/code_owners_approval_protected_branch_v12_4.png diff --git a/doc/user/project/img/code_owners_mr_widget_v12_4.png b/doc/user/project/img/code_owners_mr_widget_v12_4.png Binary files differnew file mode 100644 index 00000000000..7f7b15ee017 --- /dev/null +++ b/doc/user/project/img/code_owners_mr_widget_v12_4.png diff --git a/doc/user/project/merge_requests/img/mr_approvals_by_code_owners_v12_4.png b/doc/user/project/merge_requests/img/mr_approvals_by_code_owners_v12_4.png Binary files differnew file mode 100755 index 00000000000..c704129685f --- /dev/null +++ b/doc/user/project/merge_requests/img/mr_approvals_by_code_owners_v12_4.png diff --git a/doc/user/project/merge_requests/merge_request_approvals.md b/doc/user/project/merge_requests/merge_request_approvals.md index 5474d0d6ff6..2aa92ba2316 100644 --- a/doc/user/project/merge_requests/merge_request_approvals.md +++ b/doc/user/project/merge_requests/merge_request_approvals.md @@ -101,7 +101,7 @@ any [eligible approver](#eligible-approvers) may approve. The following can approve merge requests: - Users being added as approvers at project or merge request level. -- [Code owners](../code_owners.md) related to the merge request ([introduced](https://gitlab.com/gitlab-org/gitlab/merge_requests/7933) in [GitLab Starter](https://about.gitlab.com/pricing/) 11.5). +- [Code owners](#code-owners-as-eligible-approvers-starter) to the files changed by the merge request. An individual user can be added as an approver for a project if they are a member of: @@ -119,6 +119,31 @@ if [**Prevent author approval**](#allowing-merge-request-authors-to-approve-thei and [**Prevent committers approval**](#prevent-approval-of-merge-requests-by-their-committers) (disabled by default) are enabled on the project settings. +### Code Owners as eligible approvers **(STARTER)** + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/merge_requests/7933) in [GitLab Starter](https://about.gitlab.com/pricing/) 11.5. + +Once you've added [Code Owners](../code_owners.md) to your +repository, the owners to the corresponding files will become +eligible approvers, together with members with Developer or +higher permissions. + +To enable this merge request approval rule: + +1. Navigate to your project's **Settings > General** and expand +**Merge request approvals**. +1. Locate **All members with Developer role or higher and code owners (if any)** and click **Edit** to choose the number of approvals required. + +![MR approvals by Code Owners](img/mr_approvals_by_code_owners_v12_4.png) + +Once set, merge requests can only be merged once approved by the +number of approvals you've set. GitLab will accept approvals from +users with Developer or higher permissions, as well as by Code Owners, +indistinguishably. + +Alternatively, you can **require** +[Code Owner's approvals for Protected Branches](../protected_branches.md#protected-branches-approval-by-code-owners-premium). **(PREMIUM)** + ### Implicit approvers If the number of required approvals is greater than the number of approvers, @@ -162,26 +187,6 @@ are other conditions that may block it, such as merge conflicts, [pending discussions](../../discussions/index.md#only-allow-merge-requests-to-be-merged-if-all-threads-are-resolved) or a [failed CI/CD pipeline](merge_when_pipeline_succeeds.md). -## Code Owners approvals **(PREMIUM)** - -> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/4418) in [GitLab Premium](https://about.gitlab.com/pricing/) 11.9. - -It is possible to require at least one approval for each entry in the -[`CODEOWNERS` file](../code_owners.md) that matches a file changed in -the merge request. To enable this feature: - -1. Navigate to your project's **Settings > General** and expand - **Merge request approvals**. -1. Tick the **Require approval from code owners** checkbox. -1. Click **Save changes**. - -When this feature is enabled, all merge requests will need approval -from one code owner per matched rule before it can be merged. - -NOTE: **Note:** Only the `CODEOWNERS` file on the default branch is evaluated for -Merge Request approvals. If `CODEOWNERS` is changed on a non-default branch, those -changes will not affect approvals until merged to the default branch. - ## Overriding the merge request approvals default settings > Introduced in GitLab Enterprise Edition 9.4. diff --git a/doc/user/project/pipelines/settings.md b/doc/user/project/pipelines/settings.md index 59e04907e21..6480c7e0af9 100644 --- a/doc/user/project/pipelines/settings.md +++ b/doc/user/project/pipelines/settings.md @@ -65,14 +65,14 @@ Project defined timeout (either specific timeout set by user or the default For information about setting a maximum artifact size for a project, see [Maximum artifacts size](../../admin_area/settings/continuous_integration.md#maximum-artifacts-size-core-only). -## Custom CI config path +## Custom CI configuration path > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/12509) in GitLab 9.4. By default we look for the `.gitlab-ci.yml` file in the project's root directory. If you require a different location **within** the repository, -you can set a custom filepath that will be used to lookup the config file, -this filepath should be **relative** to the root. +you can set a custom path that will be used to look up the configuration file, +this path should be **relative** to the root. Here are some valid examples: @@ -85,7 +85,7 @@ The path can be customized at a project level. To customize the path: 1. Go to the project's **Settings > CI / CD**. 1. Expand the **General pipelines** section. -1. Provide a value in the **Custom CI config path** field. +1. Provide a value in the **Custom CI configuration path** field. 1. Click **Save changes**. ## Test coverage parsing diff --git a/doc/user/project/protected_branches.md b/doc/user/project/protected_branches.md index 1bd272bdd0c..b7c9faeb1df 100644 --- a/doc/user/project/protected_branches.md +++ b/doc/user/project/protected_branches.md @@ -86,20 +86,6 @@ Click **Protect** and the branch will appear in the "Protected branch" list. ![Roles and users list](img/protected_branches_select_roles_and_users_list.png) -## Code Owners approvals **(PREMIUM)** - -It is possible to require at least one approval for each entry in the -[`CODEOWNERS` file](code_owners.md) that matches a file changed in -the merge request. To enable this feature: - -1. Toggle the **Require approval from code owners** slider. - -1. Click **Protect**. - -When this feature is enabled, all merge requests need approval -from one code owner per matched rule before they can be merged. Additionally, -pushes to the protected branch are denied if a rule is matched. - ## Wildcard protected branches > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/4665) in GitLab 8.10. @@ -166,6 +152,35 @@ Deleting a protected branch is only allowed via the web interface, not via Git. This means that you can't accidentally delete a protected branch from your command line or a Git client application. +## Protected Branches approval by Code Owners **(PREMIUM)** + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/13251) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.4. + +It is possible to require at least one approval by a +[Code Owner](code_owners.md) to a file changed by the +merge request. You can either set Code Owners approvals +at the time you protect a new branch, or set it to a branch +already protected, as described below. + +To protect a new branch and enable Code Owner's approval: + +1. Navigate to your project's **Settings > Repository** and expand **Protected branches**. +1. Scroll down to **Protect a branch**, select a **Branch** or wildcard you'd like to protect, select who's **Allowed to merge** and **Allowed to push**, and toggle the **Require approval from code owners** slider. +1. Click **Protect**. + +![Code Owners approval - new protected branch](img/code_owners_approval_new_protected_branch_v12_4.png) + +To enable Code Owner's approval to branches already protected: + +1. Navigate to your project's **Settings > Repository** and expand **Protected branches**. +1. Scroll down to **Protected branch** and toggle the **Code owner approval** slider for the chosen branch. + +![Code Owners approval - branch already protected](img/code_owners_approval_protected_branch_v12_4.png) + +When enabled, all merge requests targeting these branches will require approval +by a Code Owner per matched rule before they can be merged. +Additionally, direct pushes to the protected branch are denied if a rule is matched. + ## Running pipelines on protected branches The permission to merge or push to protected branches is used to define if a user can diff --git a/doc/user/project/releases/img/custom_notifications_new_release_v12_4.png b/doc/user/project/releases/img/custom_notifications_new_release_v12_4.png Binary files differnew file mode 100644 index 00000000000..6b4231d5804 --- /dev/null +++ b/doc/user/project/releases/img/custom_notifications_new_release_v12_4.png diff --git a/doc/user/project/releases/index.md b/doc/user/project/releases/index.md index d5ac6f99e7f..ceb077ab8af 100644 --- a/doc/user/project/releases/index.md +++ b/doc/user/project/releases/index.md @@ -65,6 +65,18 @@ project. ![Releases list](img/releases.png) +## Notification for Releases + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/26001) in GitLab 12.4. + +You can be notified by email when a new Release is created for your project. + +To subscribe to these notifications, navigate to your **Project**'s landing page, then click on the +bell icon. Choose **Custom** from the dropdown menu. The +following modal window will be then displayed, from which you can select **New release** to complete your subscription to new Releases notifications. + +![Custom notification - New release](img/custom_notifications_new_release_v12_4.png) + <!-- ## Troubleshooting Include any troubleshooting steps that you can foresee. If you know beforehand what issues |