diff options
Diffstat (limited to 'doc/user/project/merge_requests')
38 files changed, 280 insertions, 182 deletions
diff --git a/doc/user/project/merge_requests/approvals/img/approvals_premium_mr_widget_16_0.png b/doc/user/project/merge_requests/approvals/img/approvals_premium_mr_widget_16_0.png Binary files differnew file mode 100644 index 00000000000..727dac0916b --- /dev/null +++ b/doc/user/project/merge_requests/approvals/img/approvals_premium_mr_widget_16_0.png diff --git a/doc/user/project/merge_requests/approvals/img/approvals_premium_mr_widget_v13_3.png b/doc/user/project/merge_requests/approvals/img/approvals_premium_mr_widget_v13_3.png Binary files differdeleted file mode 100644 index 306bf57354d..00000000000 --- a/doc/user/project/merge_requests/approvals/img/approvals_premium_mr_widget_v13_3.png +++ /dev/null diff --git a/doc/user/project/merge_requests/approvals/index.md b/doc/user/project/merge_requests/approvals/index.md index 717358df9f3..68d5665139a 100644 --- a/doc/user/project/merge_requests/approvals/index.md +++ b/doc/user/project/merge_requests/approvals/index.md @@ -67,7 +67,7 @@ if a user approves a merge request and is shown in the reviewer list, a green ch After a merge request receives the [number and type of approvals](rules.md) you configure, it can merge unless it's blocked for another reason. Merge requests can be blocked by other problems, -such as merge conflicts, [unresolved threads](../../../discussions/index.md#prevent-merge-unless-all-threads-are-resolved), +such as merge conflicts, [unresolved threads](../index.md#prevent-merge-unless-all-threads-are-resolved), or a [failed CI/CD pipeline](../merge_when_pipeline_succeeds.md). To prevent merge request authors from approving their own merge requests, @@ -109,11 +109,11 @@ Without the approvals, the work cannot merge. Required approvals enable multiple > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/334698) in GitLab 15.1. > - [Changed](https://gitlab.com/gitlab-org/gitlab/-/issues/389905) in GitLab 15.11 [with a flag](../../../../administration/feature_flags.md) named `invalid_scan_result_policy_prevents_merge`. Disabled by default. +> - [Enabled by default on GitLab.com and self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/405023) in GitLab 16.1. FLAG: -On self-managed GitLab, by default this feature is not available. To make it available per project or for your entire instance, -ask an administrator to [enable the feature flag](../../../../administration/feature_flags.md) named `invalid_scan_result_policy_prevents_merge`. -On GitLab.com, this feature is available but can be configured by GitLab.com administrators only. +On self-managed GitLab, by default this feature is available. To hide the feature, +ask an administrator to [disable the feature flag](../../../../administration/feature_flags.md) named `invalid_scan_result_policy_prevents_merge`. Whenever an approval rule cannot be satisfied, the rule is displayed as **(!) Auto approved**. This applies to the following conditions: diff --git a/doc/user/project/merge_requests/approvals/rules.md b/doc/user/project/merge_requests/approvals/rules.md index d55ca5dff04..bc5d4353ffc 100644 --- a/doc/user/project/merge_requests/approvals/rules.md +++ b/doc/user/project/merge_requests/approvals/rules.md @@ -104,7 +104,7 @@ supports multiple default rules: When an [eligible approver](#eligible-approvers) approves a merge request, it reduces the number of approvals left (the **Approvals** column) for all rules that the approver belongs to: -![Approvals premium merge request widget](img/approvals_premium_mr_widget_v13_3.png) +![Approvals premium merge request widget](img/approvals_premium_mr_widget_16_0.png) <i class="fa fa-youtube-play youtube" aria-hidden="true"></i> For an overview, see [Multiple Approvers](https://www.youtube.com/watch?v=8JQJ5821FrA). @@ -186,8 +186,8 @@ oversight on proposed work. To enable approval permissions for these users witho granting them push access: 1. [Create a protected branch](../../protected_branches.md) -1. [Create a new group](../../../group/manage.md#create-a-group). -1. [Add the user to the group](../../../group/manage.md#add-users-to-a-group), +1. [Create a new group](../../../group/index.md#create-a-group). +1. [Add the user to the group](../../../group/index.md#add-users-to-a-group), and select the Reporter role for the user. 1. [Share the project with your group](../../members/share_project_with_groups.md#share-a-project-with-a-group), based on the Reporter role. @@ -195,7 +195,7 @@ granting them push access: 1. In the **Merge request approvals** section, scroll to **Approval rules**, and either: - For a new rule, select **Add approval rule** and target the protected branch. - For an existing rule, select **Edit** and target the protected branch. -1. [Add the group](../../../group/manage.md#create-a-group) to the permission list. +1. [Add the group](../../../group/index.md#create-a-group) to the permission list. ![Update approval rule](img/update_approval_rule_v13_10.png) @@ -217,6 +217,14 @@ on a merge request, you can either add or remove approvers: Administrators can change the [merge request approvals settings](settings.md#prevent-editing-approval-rules-in-merge-requests) to prevent users from overriding approval rules for merge requests. +## Require multiple approvals for a rule + +To create an approval rule which requires more than one approval: + +- When you [create or edit a rule](#edit-an-approval-rule), set **Approvals required** to `2` or more. +- Use the [Merge requests approvals API](../../../../api/merge_request_approvals.md#update-merge-request-level-rule) + to set the `approvals_required` attribute to `2` or more. + ## Configure optional approval rules Merge request approvals can be optional for projects where approvals are diff --git a/doc/user/project/merge_requests/changes.md b/doc/user/project/merge_requests/changes.md index 8f6b1a32424..94f506ba556 100644 --- a/doc/user/project/merge_requests/changes.md +++ b/doc/user/project/merge_requests/changes.md @@ -27,23 +27,17 @@ To view the diff of changes included in a merge request: 1. Select the file you want to view. 1. To hide the file browser, select **Show file browser** again. -In [GitLab 13.4](https://gitlab.com/gitlab-org/gitlab/-/issues/232820) and later, files -with many changes are collapsed to improve performance. GitLab displays the message: +Files with many changes are collapsed to improve performance. GitLab displays the message: **Some changes are not shown**. To view the changes for that file, select **Expand file**. ## Show one file at a time -> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/222790) in GitLab 13.2. -> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/229848) in GitLab 13.7. - For larger merge requests, you can review one file at a time. You can change this setting [temporarily in a merge request](#in-a-merge-request-show-only-one-file-at-a-time), or so it [applies to all merge requests](#in-all-merge-requests-show-only-one-file-at-a-time). ### In a merge request, show only one file at a time -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/233898) in GitLab 13.7. - To temporarily change your viewing preferences for a specific merge request: 1. Go to your merge request, and below the merge request title, select **Changes**. @@ -149,3 +143,31 @@ When there are conflicts between the source and target branch, we show an alert per conflicted file on the merge request diff: ![Example of a conflict alert shown in a merge request diff](img/conflict_ui_v15_6.png) + +## Add a comment to a merge request file + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121429) in GitLab 16.1 [with a flag](../../../administration/feature_flags.md) named `comment_on_files`. Disabled by default. + +FLAG: +On self-managed GitLab, by default this feature is not available. To make it available, ask an administrator to [enable the feature flag](../../../administration/feature_flags.md) named `comment_on_files`. +On GitLab.com, this feature is not available. + +You can add comments to a merge request diff file. These comments persist across +rebases and file changes. + +To add a comment to a merge request file: + +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests** and find your merge request. +1. Select **Changes**. +1. In the header for the file you want to comment on, select **Comment** (**{comment}**). + +## Add a comment to an image + +In merge requests and commit detail views, you can add a comment to an image. +This comment can also be a thread. + +1. Hover your mouse over the image. +1. Select the location where you want to comment. + +An icon is displayed on the image and a comment field is displayed. diff --git a/doc/user/project/merge_requests/cherry_pick_changes.md b/doc/user/project/merge_requests/cherry_pick_changes.md index 004d24778b7..6669b2883a4 100644 --- a/doc/user/project/merge_requests/cherry_pick_changes.md +++ b/doc/user/project/merge_requests/cherry_pick_changes.md @@ -52,8 +52,8 @@ Commit `G` is added after the cherry-pick. After a merge request is merged, you can cherry-pick all changes introduced by the merge request: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests**, and find your merge request. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests**, and find your merge request. 1. Scroll to the merge request reports section, and find the **Merged by** report. 1. In the upper-right corner, select **Cherry-pick**: @@ -70,8 +70,8 @@ You can cherry-pick a single commit from multiple locations in your GitLab proje To cherry-pick a commit from the list of all commits for a project: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Repository > Commits**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Commits**. 1. Select the [title](https://git-scm.com/docs/git-commit#_discussion) of the commit you want to cherry-pick. 1. In the upper-right corner, select **Options > Cherry-pick** to show the cherry-pick modal. 1. In the modal window, select the project and branch to cherry-pick into. @@ -84,8 +84,8 @@ You can cherry-pick commits from any merge request in your project, regardless o whether the merge request is open or closed. To cherry-pick a commit from the list of commits included in a merge request: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests**, and find your merge request. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests**, and find your merge request. 1. In the merge request's secondary menu, select **Commits** to display the commit details page. 1. Select the [title](https://git-scm.com/docs/git-commit#_discussion) of the commit you want to cherry-pick. 1. In the upper-right corner, select **Options > Cherry-pick** to show the cherry-pick modal. @@ -98,8 +98,8 @@ list of commits included in a merge request: You can cherry-pick from the list of previous commits affecting an individual file when you view that file in your project's Git repository: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Repository > Files** and go to the file +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Repository** and go to the file changed by the commit. 1. Select **History**, then select the [title](https://git-scm.com/docs/git-commit#_discussion) of the commit you want to cherry-pick. diff --git a/doc/user/project/merge_requests/commit_templates.md b/doc/user/project/merge_requests/commit_templates.md index f8c24e4067b..c930c5c6f7f 100644 --- a/doc/user/project/merge_requests/commit_templates.md +++ b/doc/user/project/merge_requests/commit_templates.md @@ -29,8 +29,8 @@ Prerequisite: To do this: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Settings > Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Settings > Merge requests**. 1. Depending on the type of template you want to create, scroll to either [**Merge commit message template**](#default-template-for-merge-commits) or [**Squash commit message template**](#default-template-for-squash-commits). @@ -71,6 +71,7 @@ GitLab creates a squash commit message with this template: > - [Added](https://gitlab.com/gitlab-org/gitlab/-/issues/20421) `co_authored_by` variable in GitLab 14.7. > - [Added](https://gitlab.com/gitlab-org/gitlab/-/issues/26303) `all_commits` variable in GitLab 14.9. > - [Added](https://gitlab.com/gitlab-org/gitlab/-/issues/378352) `reviewed_by` variable in GitLab 15.7. +> - [Added](https://gitlab.com/gitlab-org/gitlab/-/issues/199823) `local_reference` variable in GitLab 16.1. Commit message templates support these variables: @@ -82,6 +83,7 @@ Commit message templates support these variables: | `%{issues}` | String with phrase `Closes <issue numbers>`. Contains all issues mentioned in the merge request description that match [issue closing patterns](../issues/managing_issues.md#closing-issues-automatically). Empty if no issues are mentioned. | `Closes #465, #190 and #400` | | `%{description}` | Description of the merge request. | `Merge request description.`<br>`Can be multiline.` | | `%{reference}` | Reference to the merge request. | `group-name/project-name!72359` | +| `%{local_reference}` | Local reference to the merge request. | `!72359` | | `%{first_commit}` | Full message of the first commit in merge request diff. | `Update README.md` | | `%{first_multiline_commit}` | Full message of the first commit that's not a merge commit and has more than one line in message body. Merge request title if all commits aren't multiline. | `Update README.md`<br><br>`Improved project description in readme file.` | | `%{url}` | Full URL to the merge request. | `https://gitlab.com/gitlab-org/gitlab/-/merge_requests/1` | diff --git a/doc/user/project/merge_requests/commits.md b/doc/user/project/merge_requests/commits.md index cc6ecd8398f..a36e45d159a 100644 --- a/doc/user/project/merge_requests/commits.md +++ b/doc/user/project/merge_requests/commits.md @@ -14,46 +14,72 @@ These commits are displayed on the merge request's **Commits** tab. From this tab, you can review commit messages and copy a commit's SHA when you need to [cherry-pick changes](cherry_pick_changes.md). -## Navigate merge request commits +## View commits in a merge request -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/18140) in GitLab 13.0. +To see the commits included in a merge request: -To navigate commits in a merge request: +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests**, then select your merge request. +1. To show a list of the commits in the merge request, newest first, select **Commits** . + To read more about the commit, select **Toggle commit description** (**{ellipsis_h}**) + on any commit. +1. To view the changes in the commit, select the title of the commit link. +1. To view other commits in the merge request, either: -1. Select the **Commits** tab. -1. Select the commit link. The most recent commit is displayed. -1. Navigate through the commits by either: + - Select **Prev** or **Next**. + - Use keyboard shortcuts: <kbd>X</kbd> (previous commit) and <kbd>C</kbd> (next commit). - - Selecting **Prev** and **Next** buttons below the tab buttons. - - Using the <kbd>X</kbd> and <kbd>C</kbd> keyboard shortcuts. +If your merge request builds upon a previous merge request, you might +need to [include more commits for context](#show-commits-from-previous-merge-requests). -![Merge requests commit navigation](img/commit_nav_v16_0.png) +### Show commits from previous merge requests -## View merge request commits in context - -> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/29274) in GitLab 13.12 [with a flag](../../../administration/feature_flags.md) named `context_commits`. Enabled by default. > - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/320757) in GitLab 14.8. > - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/320757) in GitLab 14.9. [Feature flag `context_commits`](https://gitlab.com/gitlab-org/gitlab/-/issues/320757) removed. -When reviewing a merge request, it helps to have more context about the changes -made. That includes unchanged lines in unchanged files, and previous commits -that have already merged that the change is built on. +When you review a merge request, you might need information from previous commits +to help understand the commits you're reviewing. You might need more context +if another merge request: + +- Changed files your current merge request doesn't modify, so those files aren't shown + in your current merge request's diff. +- Changed files that you're modifying in your current merge request, and you need + to see the progression of work. To add previously merged commits to a merge request for more context: -1. Go to your merge request. -1. Select the **Commits** tab. -1. Scroll to the end of the list of commits, and select **Add previously merged commits**: +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests**, then select your merge request. +1. Select **Commits**. +1. Scroll to the end of the list of commits, and select **Add previously merged commits**. 1. Select the commits that you want to add. 1. Select **Save changes**. +## Add a comment to a commit + +WARNING: +Threads created this way are lost if the commit ID changes after a +force push. + +To add discussion to a specific commit: + +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Commits**. +1. Below the commits, in the **Comment** field, enter a comment. +1. Save your comment as either a standalone comment, or a thread: + - To add a comment, select **Comment**. + - To start a thread, select the down arrow (**{chevron-down}**), then select **Start thread**. + ## View diffs between commits To view the changes between previously merged commits: -1. On your merge request, select the **Changes** tab. -1. By **Compare**, select the commit you want to view: +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests**, then select your merge request. +1. Select **Changes**. +1. By **Compare** (**{file-tree}**), select the commits to compare: ![Previously merged commits](img/previously_merged_commits_v16_0.png) -If you selected to add previously merged commits, they are displayed in the list. +If you selected to add previously merged commits for context, those commits are +also shown in the list. diff --git a/doc/user/project/merge_requests/conflicts.md b/doc/user/project/merge_requests/conflicts.md index cc8f8cb2fe6..44cef4d63e5 100644 --- a/doc/user/project/merge_requests/conflicts.md +++ b/doc/user/project/merge_requests/conflicts.md @@ -59,8 +59,8 @@ in the user interface, and you can also resolve conflicts locally through the co To resolve less-complex conflicts from the GitLab user interface: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests** and find the merge request. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests** and find the merge request. 1. Select **Overview**, and scroll to the merge request reports section. 1. Find the merge conflicts message, and select **Resolve conflicts**. GitLab shows a list of files with merge conflicts. The conflicts are @@ -84,8 +84,8 @@ Some merge conflicts are more complex, requiring you to manually modify lines to resolve their conflicts. Use the merge conflict resolution editor to resolve complex conflicts in the GitLab interface: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests** and find the merge request. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests** and find the merge request. 1. Select **Overview**, and scroll to the merge request reports section. 1. Find the merge conflicts message, and select **Resolve conflicts**. GitLab shows a list of files with merge conflicts. diff --git a/doc/user/project/merge_requests/creating_merge_requests.md b/doc/user/project/merge_requests/creating_merge_requests.md index a91d324016a..4eb4476422f 100644 --- a/doc/user/project/merge_requests/creating_merge_requests.md +++ b/doc/user/project/merge_requests/creating_merge_requests.md @@ -19,8 +19,8 @@ to streamline merge request creation. You can create a merge request from the list of merge requests. -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left menu, select **Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests**. 1. In the upper-right corner, select **New merge request**. 1. Select a source and target branch and then **Compare branches and continue**. 1. Fill out the fields and select **Create merge request**. @@ -95,8 +95,8 @@ You can create a merge request when you add, edit, or upload a file to a reposit You can create a merge request when you create a branch. -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left menu, select **Repository > Branches**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Branches**. 1. Type a branch name and select **New branch**. 1. Above the file list, on the right side, select **Create merge request**. A merge request is created. The default branch is the target. @@ -142,9 +142,9 @@ to reduce the need for editing merge requests manually through the UI. You can create a merge request from your fork to contribute back to the main project. -1. On the top bar, select **Main menu > Projects** and find your project. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. 1. Select your fork of the repository. -1. On the left menu, go to **Merge requests**, and select **New merge request**. +1. On the left sidebar, select **Code > Merge requests**, and select **New merge request**. 1. In the **Source branch** dropdown list box, select the branch in your forked repository as the source branch. 1. In the **Target branch** dropdown list box, select the branch from the upstream repository as the target branch. You can set a [default target project](#set-the-default-target-project) to @@ -171,8 +171,8 @@ Prerequisites: To create a merge request by sending an email: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left menu, select **Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests**. 1. In the upper-right corner, select **Email a new merge request to this project**. An email address is displayed. Copy this address. Ensure you keep this address private. @@ -216,8 +216,8 @@ scenarios when you create a new merge request: To have merge requests from a fork by default target your own fork (instead of the upstream project), you can change the default. -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left menu, select **Settings > General > Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Settings > Merge requests**. 1. In the **Target project** section, select the option you want to use for your default target project. 1. Select **Save changes**. diff --git a/doc/user/project/merge_requests/csv_export.md b/doc/user/project/merge_requests/csv_export.md index f40b82a6280..f8988ae7bd7 100644 --- a/doc/user/project/merge_requests/csv_export.md +++ b/doc/user/project/merge_requests/csv_export.md @@ -12,8 +12,8 @@ Export all the data collected from a project's merge requests into a comma-separ To export merge requests to a CSV file: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests** . +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests**. 1. Add any searches or filters. This can help you keep the size of the CSV file under the 15 MB limit. The limit ensures the file can be emailed to a variety of email providers. 1. Select **Actions** (**{ellipsis_v}**) **> Export as CSV**. diff --git a/doc/user/project/merge_requests/dependencies.md b/doc/user/project/merge_requests/dependencies.md index 3d92fc9a91e..1cd81e2aac2 100644 --- a/doc/user/project/merge_requests/dependencies.md +++ b/doc/user/project/merge_requests/dependencies.md @@ -57,8 +57,8 @@ information about the dependency: To view dependency information on a merge request: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests** and identify your merge request. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests** and identify your merge request. 1. Scroll to the merge request reports area. Dependent merge requests display information about the total number of dependencies set, such as **(status-warning)** **Depends on 1 merge request being merged**. @@ -105,8 +105,8 @@ Prerequisite: To do this: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests** and identify your merge request. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests** and identify your merge request. 1. Select **Edit**. 1. In **Merge request dependencies**, paste either the reference or the full URL to the merge requests that should merge before this work merges. References @@ -120,8 +120,8 @@ Prerequisite: - You must have a role in the project that allows you to edit merge requests. -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests** and identify your merge request. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests** and identify your merge request. 1. Select **Edit**. 1. Scroll to **Merge request dependencies** and select **Remove** next to the reference for each dependency you want to remove. diff --git a/doc/user/project/merge_requests/drafts.md b/doc/user/project/merge_requests/drafts.md index 88e5e4a6283..6f309d2db24 100644 --- a/doc/user/project/merge_requests/drafts.md +++ b/doc/user/project/merge_requests/drafts.md @@ -12,7 +12,7 @@ or open threads, you can prevent it from being accepted before you [mark it as ready](#mark-merge-requests-as-ready). Flag it as a draft to disable the **Merge** button until you remove the **Draft** flag: -![Blocked Merge Button](img/draft_blocked_merge_button_v13_10.png) +![Blocked Merge Button](img/merge_request_draft_blocked_v16_0.png) ## Mark merge requests as drafts @@ -42,10 +42,7 @@ When a merge request is ready to be merged, you can remove the `Draft` flag in s - **Viewing a merge request**: In the upper-right corner of the merge request, select **Mark as ready**. Users with at least the Developer role - can also scroll to the bottom of the merge request description and select **Mark as ready**: - - ![Mark as ready](img/draft_blocked_merge_button_v13_10.png) - + can also scroll to the bottom of the merge request description and select **Mark as ready**. - **Editing an existing merge request**: Remove `[Draft]`, `Draft:` or `(Draft)` from the beginning of the title, or clear **Mark as draft** below the **Title** field. @@ -71,7 +68,7 @@ draft merge requests: 1. Select **Yes** to include drafts, or **No** to exclude, and press **Return** to update the list of merge requests: - ![Filter draft merge requests](img/filter_draft_merge_requests_v13_10.png) + ![Filter draft merge requests](img/filter_draft_merge_requests_v16_0.png) ## Pipelines for drafts diff --git a/doc/user/project/merge_requests/img/auto_merge_ready_v16_0.png b/doc/user/project/merge_requests/img/auto_merge_ready_v16_0.png Binary files differnew file mode 100644 index 00000000000..e68057e73a0 --- /dev/null +++ b/doc/user/project/merge_requests/img/auto_merge_ready_v16_0.png diff --git a/doc/user/project/merge_requests/img/commit_nav_v16_0.png b/doc/user/project/merge_requests/img/commit_nav_v16_0.png Binary files differdeleted file mode 100644 index 6005e516fff..00000000000 --- a/doc/user/project/merge_requests/img/commit_nav_v16_0.png +++ /dev/null diff --git a/doc/user/project/merge_requests/img/create_new_issue_v15_4.png b/doc/user/project/merge_requests/img/create_new_issue_v15_4.png Binary files differnew file mode 100644 index 00000000000..3720b601cc5 --- /dev/null +++ b/doc/user/project/merge_requests/img/create_new_issue_v15_4.png diff --git a/doc/user/project/merge_requests/img/draft_blocked_merge_button_v13_10.png b/doc/user/project/merge_requests/img/draft_blocked_merge_button_v13_10.png Binary files differdeleted file mode 100644 index 3bac9f7fee8..00000000000 --- a/doc/user/project/merge_requests/img/draft_blocked_merge_button_v13_10.png +++ /dev/null diff --git a/doc/user/project/merge_requests/img/filter_draft_merge_requests_v13_10.png b/doc/user/project/merge_requests/img/filter_draft_merge_requests_v13_10.png Binary files differdeleted file mode 100644 index 4458df987d6..00000000000 --- a/doc/user/project/merge_requests/img/filter_draft_merge_requests_v13_10.png +++ /dev/null diff --git a/doc/user/project/merge_requests/img/filter_draft_merge_requests_v16_0.png b/doc/user/project/merge_requests/img/filter_draft_merge_requests_v16_0.png Binary files differnew file mode 100644 index 00000000000..f4356aade16 --- /dev/null +++ b/doc/user/project/merge_requests/img/filter_draft_merge_requests_v16_0.png diff --git a/doc/user/project/merge_requests/img/filtering_merge_requests_by_date_v14_6.png b/doc/user/project/merge_requests/img/filtering_merge_requests_by_date_v14_6.png Binary files differdeleted file mode 100644 index 398820f7864..00000000000 --- a/doc/user/project/merge_requests/img/filtering_merge_requests_by_date_v14_6.png +++ /dev/null diff --git a/doc/user/project/merge_requests/img/filtering_merge_requests_by_environment_v14_6.png b/doc/user/project/merge_requests/img/filtering_merge_requests_by_environment_v14_6.png Binary files differdeleted file mode 100644 index c35f2c8a58b..00000000000 --- a/doc/user/project/merge_requests/img/filtering_merge_requests_by_environment_v14_6.png +++ /dev/null diff --git a/doc/user/project/merge_requests/img/merge_request_assignees_v16_0.png b/doc/user/project/merge_requests/img/merge_request_assignees_v16_0.png Binary files differnew file mode 100644 index 00000000000..114ddf612e0 --- /dev/null +++ b/doc/user/project/merge_requests/img/merge_request_assignees_v16_0.png diff --git a/doc/user/project/merge_requests/img/merge_request_draft_blocked_v16_0.png b/doc/user/project/merge_requests/img/merge_request_draft_blocked_v16_0.png Binary files differnew file mode 100644 index 00000000000..88fe1ec34c0 --- /dev/null +++ b/doc/user/project/merge_requests/img/merge_request_draft_blocked_v16_0.png diff --git a/doc/user/project/merge_requests/img/merge_request_pipeline.png b/doc/user/project/merge_requests/img/merge_request_pipeline.png Binary files differdeleted file mode 100644 index ce1d6bab536..00000000000 --- a/doc/user/project/merge_requests/img/merge_request_pipeline.png +++ /dev/null diff --git a/doc/user/project/merge_requests/img/multiple_assignees_for_merge_requests_sidebar.png b/doc/user/project/merge_requests/img/multiple_assignees_for_merge_requests_sidebar.png Binary files differdeleted file mode 100644 index dde2680ed74..00000000000 --- a/doc/user/project/merge_requests/img/multiple_assignees_for_merge_requests_sidebar.png +++ /dev/null diff --git a/doc/user/project/merge_requests/img/mwps_v15_4.png b/doc/user/project/merge_requests/img/mwps_v15_4.png Binary files differdeleted file mode 100644 index f042912d470..00000000000 --- a/doc/user/project/merge_requests/img/mwps_v15_4.png +++ /dev/null diff --git a/doc/user/project/merge_requests/img/new-issue-one-thread_v14_3.png b/doc/user/project/merge_requests/img/new-issue-one-thread_v14_3.png Binary files differnew file mode 100644 index 00000000000..34d3a3be0a7 --- /dev/null +++ b/doc/user/project/merge_requests/img/new-issue-one-thread_v14_3.png diff --git a/doc/user/project/merge_requests/img/post_merge_pipeline_v16_0.png b/doc/user/project/merge_requests/img/post_merge_pipeline_v16_0.png Binary files differnew file mode 100644 index 00000000000..b14ce645850 --- /dev/null +++ b/doc/user/project/merge_requests/img/post_merge_pipeline_v16_0.png diff --git a/doc/user/project/merge_requests/img/unresolved_threads_v15_4.png b/doc/user/project/merge_requests/img/unresolved_threads_v15_4.png Binary files differnew file mode 100644 index 00000000000..1d1669de0f1 --- /dev/null +++ b/doc/user/project/merge_requests/img/unresolved_threads_v15_4.png diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md index a65c5518658..38125f623eb 100644 --- a/doc/user/project/merge_requests/index.md +++ b/doc/user/project/merge_requests/index.md @@ -50,8 +50,8 @@ You can view merge requests for your project, group, or yourself. To view all merge requests for a project: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests**. Or, to use a [keyboard shortcut](../../shortcuts.md), press <kbd>g</kbd> + <kbd>m</kbd>. @@ -59,8 +59,8 @@ Or, to use a [keyboard shortcut](../../shortcuts.md), press <kbd>g</kbd> + <kbd> To view merge requests for all projects in a group: -1. On the top bar, select **Main menu > Groups** and find your group. -1. On the left sidebar, select **Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your group. +1. Select **Code > Merge requests**. If your group contains subgroups, this view also displays merge requests from the subgroup projects. @@ -68,21 +68,17 @@ If your group contains subgroups, this view also displays merge requests from th To view all merge requests assigned to you: -<!-- vale gitlab.FirstPerson = NO --> - -1. On the top bar, put your cursor in the **Search** box. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**). 1. From the dropdown list, select **Merge requests assigned to me**. -<!-- vale gitlab.FirstPerson = YES --> - or: - To use a [keyboard shortcut](../../shortcuts.md), press <kbd>Shift</kbd> + <kbd>m</kbd>. or: -1. On the top bar, in the upper-right corner, select **Merge requests** (**{merge-request-open}**). -1. From the dropdown list, select **Assigned to you**. +1. On the left sidebar, at the top, select **Merge requests** (**{merge-request}**). +1. From the dropdown list, select **Assigned**. ## Filter the list of merge requests @@ -93,6 +89,8 @@ or: To filter the list of merge requests: +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests**. 1. Above the list of merge requests, select **Search or filter results...**. 1. From the dropdown list, select the attribute you wish to filter by. Some examples: - [**By environment or deployment date**](#by-environment-or-deployment-date). @@ -132,17 +130,15 @@ Projects using a [fast-forward merge method](methods/index.md#fast-forward-merge do not return results, as this method does not create a merge commit. When filtering by an environment, a dropdown list presents all environments that -you can choose from: +you can choose from. -![Filter MRs by their environment](img/filtering_merge_requests_by_environment_v14_6.png) +When filtering by `Deployed-before` or `Deployed-after`: -When filtering by `Deployed-before` or `Deployed-after`, the date refers to when -the deployment to an environment (triggered by the merge commit) completed successfully. -You must enter the deploy date manually. Deploy dates -use the format `YYYY-MM-DD`, and must be quoted if you wish to specify -both a date and time (`"YYYY-MM-DD HH:MM"`): - -![Filter MRs by a deploy date](img/filtering_merge_requests_by_date_v14_6.png) +- The date refers to when the deployment to an environment (triggered by the + merge commit) completed successfully. +- You must enter the deploy date manually. +- Deploy dates use the format `YYYY-MM-DD`, and must be wrapped in double quotes (`"`) + if you want to specify both a date and time (`"YYYY-MM-DD HH:MM"`). ## Add changes to a merge request @@ -167,8 +163,8 @@ To assign the merge request to a user, use the `/assign @user` [quick action](../quick_actions.md#issues-merge-requests-and-epics) in a text area in a merge request, or: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests** and find your merge request. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests** and find your merge request. 1. On the right sidebar, expand the right sidebar and locate the **Assignees** section. 1. Select **Edit**. 1. Search for the user you want to assign, and select the user. @@ -182,13 +178,13 @@ The merge request is added to the user's assigned merge request list. GitLab enables multiple assignees for merge requests, if multiple people are accountable for it: -![multiple assignees for merge requests sidebar](img/multiple_assignees_for_merge_requests_sidebar.png) +![multiple assignees for merge requests sidebar](img/merge_request_assignees_v16_0.png) To assign multiple assignees to a merge request, use the `/assign @user` [quick action](../quick_actions.md#issues-merge-requests-and-epics) in a text area, or: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests** and find your merge request. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests** and find your merge request. 1. On the right sidebar, expand the right sidebar and locate the **Assignees** section. 1. Select **Edit** and, from the dropdown list, select all users you want to assign the merge request to. @@ -300,7 +296,7 @@ For a software developer working in a team: 1. Your manager: 1. Pushes a commit with their final review. 1. [Approves the merge request](approvals/index.md). - 1. Sets it to [merge when pipeline succeeds](merge_when_pipeline_succeeds.md). + 1. Sets it to [auto-merge](merge_when_pipeline_succeeds.md) (formerly **Merge when pipeline succeeds**). 1. Your changes get deployed to production with [manual jobs](../../../ci/jobs/job_control.md#create-a-job-that-must-be-run-manually) for GitLab CI/CD. 1. Your implementations were successfully shipped to your customer. @@ -316,18 +312,19 @@ For a web developer writing a webpage for your company's website: ## Filter activity in a merge request -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/115383) in GitLab 15.11 [with a flag](../../../administration/feature_flags.md) named `mr_activity_filters`. Disabled by default. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/115383) in GitLab 15.11 [with a flag](../../../administration/feature_flags.md) named `mr_activity_filters`. Disabled by default. +> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/387070) in GitLab 16.0. Available to GitLab team members only. FLAG: On self-managed GitLab, by default this feature is not available. To make it available per user, ask an administrator to [enable the feature flag](../../../administration/feature_flags.md) named `mr_activity_filters` for individual or groups of users. -On GitLab.com, this feature unavailable. +On GitLab.com, this feature is enabled for GitLab team members only. To understand the history of a merge request, filter its activity feed to show you only the items that are relevant to you. -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests**. 1. Select a merge request. 1. Scroll to **Activity**. 1. On the right side of the page, select **Activity filter** to show the filter options. @@ -351,6 +348,78 @@ only the items that are relevant to you. Your selection persists across all merge requests. You can also change the sort order by clicking the sort button on the right. +## Resolve a thread + +> Resolving comments individually was [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/28750) in GitLab 13.6. + +In a merge request, you can resolve a thread when you want to finish a conversation. + +Prerequisites: + +- You must have at least the Developer role + or be the author of the change being reviewed. +- Resolvable threads can be added only to merge requests. It doesn't work + for comments in issues, commits, or snippets. + +To resolve a thread: + +1. Go to the thread. +1. Do one of the following: + - In the upper-right corner of the original comment, select **Resolve thread** (**{check-circle}**). + - Below the last reply, in the **Reply** field, select **Resolve thread**. + - Below the last reply, in the **Reply** field, enter text, select the **Resolve thread** checkbox, and select **Add comment now**. + +At the top of the page, the number of unresolved threads is updated: + +![Count of unresolved threads](img/unresolved_threads_v15_4.png) + +### Move all unresolved threads in a merge request to an issue + +If you have multiple unresolved threads in a merge request, you can +create an issue to resolve them separately. In the merge request, at the top of the page, +select the ellipsis icon button (**{ellipsis_v}**) in the threads control and then select **Resolve all with new issue**: + +![Open new issue for all unresolved threads](img/create_new_issue_v15_4.png) + +All threads are marked as resolved, and a link is added from the merge request to +the newly created issue. + +### Move one unresolved thread in a merge request to an issue + +If you have one specific unresolved thread in a merge request, you can +create an issue to resolve it separately. In the merge request, under the last reply +to the thread, next to **Resolve thread**, select **Create issue to resolve thread** (**{issue-new}**): + +![Create issue for thread](img/new-issue-one-thread_v14_3.png) + +The thread is marked as resolved, and a link is added from the merge request to +the newly created issue. + +### Prevent merge unless all threads are resolved + +You can prevent merge requests from being merged until all threads are +resolved. When this setting is enabled, the **Unresolved threads** counter in a merge request +is shown in orange when at least one thread remains unresolved. + +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Settings > Merge requests**. +1. In the **Merge checks** section, select the **All threads must be resolved** checkbox. +1. Select **Save changes**. + +### Automatically resolve threads in a merge request when they become outdated + +You can set merge requests to automatically resolve threads when lines are modified +with a new push. + +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Settings > Merge requests**. +1. In the **Merge options** section, select + **Automatically resolve merge request diff threads when they become outdated**. +1. Select **Save changes**. + +Threads are now resolved if a push makes a diff section outdated. +Threads on lines that don't change and top-level resolvable threads are not resolved. + ## Related topics - [Create a merge request](creating_merge_requests.md) diff --git a/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md b/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md index 7588af70bd4..66c3b1fda74 100644 --- a/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md +++ b/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md @@ -9,29 +9,29 @@ type: reference, concepts > **Merge when pipeline succeeds** and **Add to merge train when pipeline succeeds** [renamed](https://gitlab.com/gitlab-org/gitlab/-/issues/409530) to **Auto-merge** in GitLab 16.0 [with a flag](../../../administration/feature_flags.md) named `auto_merge_labels_mr_widget`. Enabled by default. -NOTE: -[In GitLab 16.0 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/359057), **Merge when pipeline succeeds** and **Add to merge train when pipeline succeeds** become **Set to auto-merge**. - If you review a merge request and it's ready to merge, but the pipeline hasn't -completed yet, you can set it to merge when the pipeline succeeds (MWPS). You don't +completed yet, you can set it to auto-merge. You don't have to remember later to merge the work manually: -![Enable MWPS on a merge request](img/mwps_v15_4.png) +![Auto-merge is ready](img/auto_merge_ready_v16_0.png) + +NOTE: +[In GitLab 16.0 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/359057), **Merge when pipeline succeeds** and **Add to merge train when pipeline succeeds** are renamed **Set to auto-merge**. If the pipeline succeeds, the merge request is merged. If the pipeline fails, the author can either retry any failed jobs, or push new commits to fix the failure: - If a retried job succeeds on the second try, the merge request is merged. -- If new commits are added to the merge request, GitLab cancels the MWPS request +- If new commits are added to the merge request, GitLab cancels the request to ensure the new changes are reviewed before merge. -## Set a merge request to MWPS +## Auto-merge a merge request Prerequisites: - You must have at least the Developer role in the project. - If the project is configured to require it, all threads in the - merge request [must be resolved](../../discussions/index.md#resolve-a-thread). + merge request [must be resolved](index.md#resolve-a-thread). - The merge request must have received all required approvals. To do this when pushing from the command line, use the `merge_request.merge_when_pipeline_succeeds` @@ -39,20 +39,20 @@ To do this when pushing from the command line, use the `merge_request.merge_when To do this from the GitLab user interface: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests**. 1. Scroll to the merge request reports section. 1. Optional. Select your desired merge options, such as **Delete source branch**, **Squash commits**, or **Edit commit message**. -1. Select **Merge when pipeline succeeds**. +1. Select **Auto-merge**. -If a new comment is added to the merge request after you select **Merge when pipeline succeeds**, +If a new comment is added to the merge request after you select **Auto-merge**, but before the pipeline completes, GitLab blocks the merge until you resolve all existing threads. ## Cancel an auto-merge -If a merge request is set to MWPS, you can cancel it. +If a merge request is set to auto-merge, you can cancel it. Prerequisites: @@ -62,8 +62,8 @@ Prerequisites: To do this: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests**. 1. Scroll to the merge request reports section. 1. Select **Cancel auto-merge**. @@ -88,8 +88,8 @@ Prerequisites: To enable this setting: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Settings > Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Settings > Merge requests**. 1. Scroll to **Merge checks**, and select **Pipelines must succeed**. This setting also prevents merge requests from being merged if there is no pipeline, which can [conflict with some rules](#merge-requests-dont-merge-when-successful-pipeline-is-required). @@ -109,9 +109,8 @@ Prerequisite: To change this behavior: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Settings > General**. -1. Expand **Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Settings > Merge requests**. 1. Under **Merge checks**: - Select **Pipelines must succeed**. - Select **Skipped pipelines are considered successful**. diff --git a/doc/user/project/merge_requests/methods/index.md b/doc/user/project/merge_requests/methods/index.md index 02bd4ed0502..7bb10303d7e 100644 --- a/doc/user/project/merge_requests/methods/index.md +++ b/doc/user/project/merge_requests/methods/index.md @@ -26,8 +26,8 @@ gitGraph ## Configure a project's merge method -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Settings > Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Settings > Merge requests**. 1. Select your desired **Merge method** from these options: - Merge commit - Merge commit with semi-linear history diff --git a/doc/user/project/merge_requests/revert_changes.md b/doc/user/project/merge_requests/revert_changes.md index 77fd78ee0d0..c4288a7793c 100644 --- a/doc/user/project/merge_requests/revert_changes.md +++ b/doc/user/project/merge_requests/revert_changes.md @@ -30,8 +30,8 @@ Prerequisites: To do this: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests** and identify your merge request. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests** and identify your merge request. 1. Scroll to the merge request reports area, and find the report showing when the merge request was merged. 1. Select **Revert**. @@ -55,13 +55,13 @@ Prerequisites: To do this: -1. On the top bar, select **Main menu > Projects** and find your project. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. 1. If you know the merge request that contains the commit: - 1. On the left sidebar, select **Merge requests** and identify your merge request. + 1. Select **Code > Merge requests**, then identify and select your merge request. 1. Select **Commits**, then select the title of the commit you want to revert. This displays the commit in the **Changes** tab of your merge request. 1. Select the commit hash you want to revert. GitLab displays the contents of the commit. 1. If you don't know the merge request the commit originated from: - 1. On the left sidebar, select **Repository > Commits**. + 1. Select **Code > Commits**. 1. Select the title of the commit to display full information about the commit. 1. In the upper-right corner, select **Options**, then select **Revert**. 1. In **Revert in branch**, select the branch to revert your changes into. diff --git a/doc/user/project/merge_requests/reviews/index.md b/doc/user/project/merge_requests/reviews/index.md index 0de38874304..86468af06a2 100644 --- a/doc/user/project/merge_requests/reviews/index.md +++ b/doc/user/project/merge_requests/reviews/index.md @@ -7,9 +7,6 @@ type: index, reference # Merge request reviews **(FREE)** -> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/216054) in GitLab 13.5. -> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/245190) in GitLab 13.9. - [Merge requests](../index.md) are the primary method of making changes to files in a GitLab project. [Create and submit a merge request](../creating_merge_requests.md) to propose changes. Your team leaves [comments](../../../discussions/index.md) on @@ -26,7 +23,7 @@ For an overview, see [Merge request review](https://www.youtube.com/watch?v=2May ## Suggested reviewers **(ULTIMATE SAAS)** -> - [Introduced](https://gitlab.com/groups/gitlab-org/modelops/applied-ml/review-recommender/-/epics/3) in GitLab 15.4 as a [Beta](../../../../policy/alpha-beta-support.md#beta) feature [with a flag](../../../../administration/feature_flags.md) named `suggested_reviewers_control`. Disabled by default. +> - [Introduced](https://gitlab.com/groups/gitlab-org/modelops/applied-ml/review-recommender/-/epics/3) in GitLab 15.4 as a [Beta](../../../../policy/experiment-beta-support.md#beta) feature [with a flag](../../../../administration/feature_flags.md) named `suggested_reviewers_control`. Disabled by default. > - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/368356) in GitLab 15.6. > - Beta designation [removed from the UI](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/113058) in GitLab 15.10. @@ -52,9 +49,6 @@ of a merge request with new commits. ## Review a merge request -> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/4213) in GitLab 11.4. -> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/28154) from GitLab Premium to GitLab Free in 13.1. - When you review a merge request, you can create comments that are visible only to you. When you're ready, you can publish them together in a single action. To start your review: @@ -62,7 +56,7 @@ To start your review: 1. Go to the merge request you want to review, and select the **Changes** tab. For more information about navigating the diffs displayed in this tab, see [Changes in merge requests](../changes.md). -1. Select the **{comment}** **comment** icon in the gutter to expand the diff lines +1. Select **Add a comment to this line** (**{comment}**) in the gutter to expand the diff lines and display a comment box. In GitLab version 13.2 and later, you can [select multiple lines](#comment-on-multiple-lines). 1. In the text area, write your first comment, then select **Start a review** below your comment. @@ -75,8 +69,7 @@ To start your review: are now visible, and any [quick actions](../../quick_actions.md) included in your comments are performed. -[In GitLab 13.10 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/292936), -if you [approve a merge request](../approvals/index.md#approve-a-merge-request) and +If you [approve a merge request](../approvals/index.md#approve-a-merge-request) and are shown in the reviewer list, a green check mark **{check-circle-filled}** displays next to your name. @@ -84,8 +77,8 @@ displays next to your name. To download the changes included in a merge request as a diff: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests**. 1. Select your merge request. 1. In the upper-right corner, select **Code > Plain diff**. @@ -107,8 +100,8 @@ curl "https://gitlab.com/gitlab-org/gitlab/-/merge_requests/000000.diff" | git a To download the changes included in a merge request as a patch file: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests**. 1. Select your merge request. 1. In the upper-right corner, select **Code > Patches**. @@ -147,7 +140,7 @@ When you submit your review, GitLab: ### Resolve or unresolve thread with a comment -Review comments can also resolve or unresolve [resolvable threads](../../../discussions/index.md#resolve-a-thread). +Review comments can also resolve or unresolve [resolvable threads](../index.md#resolve-a-thread). To resolve or unresolve a thread when replying to a comment: 1. In the comment text area, write your comment. @@ -161,8 +154,6 @@ Pending comments display information about the action to be taken when the comme ### Add a new comment -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/8225) in GitLab 13.10. - If you have a review in progress, you can also add a comment from the **Overview** tab by selecting **Add to review**: @@ -170,9 +161,6 @@ If you have a review in progress, you can also add a comment from the **Overview ### Approval Rule information for Reviewers **(PREMIUM)** -> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/233736) in GitLab 13.8. -> - [Feature flag `reviewer_approval_rules` removed](https://gitlab.com/gitlab-org/gitlab/-/issues/293742) in GitLab 13.9. - When editing the **Reviewers** field in a new or existing merge request, GitLab displays the name of the matching [approval rule](../approvals/rules.md) below the name of each suggested reviewer. [Code Owners](../../codeowners/index.md) are displayed as `Codeowner` without group detail. @@ -187,8 +175,6 @@ This example shows reviewers and approval rules in a merge request sidebar: ### Request a new review -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/293933) in GitLab 13.9. - After a reviewer completes their [merge request reviews](../../../discussions/index.md), the author of the merge request can request a new review from the reviewer: @@ -202,18 +188,14 @@ them a notification email. ## Comment on multiple lines -> - [Introduced](https://gitlab.com/gitlab-org/ux-research/-/issues/870) in GitLab 13.2. -> - [Added](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49875) select-and-drag features in GitLab 13.8. -> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/299121) in GitLab 13.9. - When commenting on a diff, you can select which lines of code your comment refers to by either: ![Comment on any diff file line](img/comment-on-any-diff-line_v13_10.png) -- Dragging the **{comment}** **comment** icon in the gutter to highlight +- Dragging **Add a comment to this line** (**{comment}**) in the gutter to highlight lines in the diff. GitLab expands the diff lines and displays a comment box. -- After starting a comment by selecting the **{comment}** **comment** icon in the +- After starting a comment by selecting **Add a comment to this line** (**{comment}**) in the gutter, select the first line number your comment refers to in the **Commenting on lines** select box. New comments default to single-line comments, unless you select a different starting line. @@ -245,8 +227,6 @@ To update multiple project merge requests at the same time: ## Bulk edit merge requests at the group level **(PREMIUM)** -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/12719) in GitLab 12.2. - Users with at least the Developer role can manage merge requests. When bulk editing merge requests in a group, you can edit the following attributes: @@ -315,8 +295,6 @@ the command line. ### Copy the branch name for local checkout -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/23767) in GitLab 13.4. - The merge request sidebar contains the branch reference for the source branch used to contribute changes for this merge request. @@ -418,9 +396,6 @@ All the above can be done with the [`git-mr`](https://gitlab.com/glensc/git-mr) ## Cached merge request count -> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/299542) in GitLab 13.11. -> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/327319) in GitLab 14.0. - In a group, the sidebar displays the total count of open merge requests. This value is cached if it's greater than than 1000. The cached value is rounded to thousands (or millions) and updated every 24 hours. diff --git a/doc/user/project/merge_requests/reviews/suggestions.md b/doc/user/project/merge_requests/reviews/suggestions.md index 9187c5fad44..24197c5c313 100644 --- a/doc/user/project/merge_requests/reviews/suggestions.md +++ b/doc/user/project/merge_requests/reviews/suggestions.md @@ -17,8 +17,8 @@ merge request, authored by the user who suggested the changes. ## Create suggestions -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests** and find your merge request. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests** and find your merge request. 1. On the secondary menu, select **Changes**. 1. Find the lines of code you want to change. - To select a single line: @@ -80,8 +80,8 @@ Prerequisites: To apply suggested changes directly from the merge request: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests** and find your merge request. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests** and find your merge request. 1. Find the comment containing the suggestion you want to apply. - To apply suggestions individually, select **Apply suggestion**. - To apply multiple suggestions in a single commit, select **Add suggestion to batch**. @@ -128,8 +128,8 @@ Merge requests created from forks use the template defined in the target project To meet your project's needs, you can customize these messages and include other placeholder variables: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Settings > Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Settings > Merge requests**. 1. Scroll to **Merge suggestions**, and alter the text to meet your needs. See [Supported variables](#supported-variables) for a list of placeholders you can use in this message. @@ -155,7 +155,7 @@ For example, to customize the commit message to output ## Batch suggestions -> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/25486) in GitLab 13.1 as an [Experiment](../../../../policy/alpha-beta-support.md#experiment) with a flag named `batch_suggestions`, disabled by default. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/25486) in GitLab 13.1 as an [Experiment](../../../../policy/experiment-beta-support.md#experiment) with a flag named `batch_suggestions`, disabled by default. > - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/227799) in GitLab 13.2. > - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/320755) in GitLab 13.11. [Feature flag `batch_suggestions`](https://gitlab.com/gitlab-org/gitlab/-/issues/320755) removed. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/326168) custom commit messages for batch suggestions in GitLab 14.4. @@ -163,8 +163,8 @@ For example, to customize the commit message to output To reduce the number of commits added to your branch, you can apply multiple suggestions in a single commit. -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Merge requests** and find your merge request. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Code > Merge requests** and find your merge request. 1. For each suggestion you want to apply, and select **Add suggestion to batch**. 1. Optional. To remove a suggestion, select **Remove from batch**. 1. After you add your desired suggestions, select **Apply suggestions**. diff --git a/doc/user/project/merge_requests/squash_and_merge.md b/doc/user/project/merge_requests/squash_and_merge.md index 075716e90c8..b9b8485021b 100644 --- a/doc/user/project/merge_requests/squash_and_merge.md +++ b/doc/user/project/merge_requests/squash_and_merge.md @@ -71,8 +71,8 @@ Prerequisites: To configure the default squashing behavior for all merge requests in your project: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Settings > Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Settings > Merge requests**. 1. In the **Squash commits when merging** section, select your desired behavior: - **Do not allow**: Squashing is never performed, and the option is not displayed. - **Allow**: Squashing is allowed, but cleared by default. diff --git a/doc/user/project/merge_requests/status_checks.md b/doc/user/project/merge_requests/status_checks.md index 0e339c65ed5..a151a7cbf1b 100644 --- a/doc/user/project/merge_requests/status_checks.md +++ b/doc/user/project/merge_requests/status_checks.md @@ -36,8 +36,8 @@ see [epic 3869](https://gitlab.com/groups/gitlab-org/-/epics/3869). By default, merge requests in projects can be merged even if external status checks fail. To block the merging of merge requests when external checks fail: -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Settings > Merge requests**. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Settings > Merge requests**. 1. Select the **Status checks must succeed** checkbox. 1. Select **Save changes**. diff --git a/doc/user/project/merge_requests/widgets.md b/doc/user/project/merge_requests/widgets.md index a7aa86a16d4..639552ca75a 100644 --- a/doc/user/project/merge_requests/widgets.md +++ b/doc/user/project/merge_requests/widgets.md @@ -41,11 +41,11 @@ for environments. If it's the first time the branch is deployed, the link returns a `404` error until done. During the deployment, the stop button is disabled. If the pipeline fails to deploy, the deployment information is hidden. -![Merge request pipeline](img/merge_request_pipeline.png) +![Merge request pipeline](img/post_merge_pipeline_v16_0.png) For more information, [read about pipelines](../../../ci/pipelines/index.md). -## Merge when pipeline succeeds (MWPS) +## Set auto-merge Set a merge request that looks ready to merge to [merge automatically when CI pipeline succeeds](merge_when_pipeline_succeeds.md). @@ -65,7 +65,7 @@ faster to preview proposed modifications. ## License compliance **(ULTIMATE)** -If you have configured [License Compliance](../../compliance/license_compliance/index.md) for your project, then you can view a list of licenses that are detected for your project's dependencies. +If you have configured [License Compliance](../../compliance/license_scanning_of_cyclonedx_files/index.md) for your project, then you can view a list of licenses that are detected for your project's dependencies. ![Merge request pipeline](img/license_compliance_widget_v15_3.png) |