summaryrefslogtreecommitdiff
path: root/doc/user/project/merge_requests
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user/project/merge_requests')
-rw-r--r--doc/user/project/merge_requests/code_quality.md40
-rw-r--r--doc/user/project/merge_requests/creating_merge_requests.md207
-rw-r--r--doc/user/project/merge_requests/getting_started.md151
-rw-r--r--doc/user/project/merge_requests/img/create_merge_request_button_v12_6.pngbin0 -> 9428 bytes
-rw-r--r--doc/user/project/merge_requests/img/dependencies_edit_inaccessible_v12_4.pngbin55947 -> 19518 bytes
-rw-r--r--doc/user/project/merge_requests/img/dependencies_edit_v12_4.pngbin53561 -> 18741 bytes
-rw-r--r--doc/user/project/merge_requests/img/dependencies_view_v12_2.pngbin37528 -> 13579 bytes
-rw-r--r--doc/user/project/merge_requests/img/incrementally_expand_merge_request_diffs_v12_2.pngbin96982 -> 28918 bytes
-rw-r--r--doc/user/project/merge_requests/img/merge_request_diff_v12_2.pngbin136144 -> 60405 bytes
-rw-r--r--doc/user/project/merge_requests/img/new_merge_request_page_v12_6.pngbin0 -> 81875 bytes
-rw-r--r--doc/user/project/merge_requests/index.md67
-rw-r--r--doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md52
12 files changed, 356 insertions, 161 deletions
diff --git a/doc/user/project/merge_requests/code_quality.md b/doc/user/project/merge_requests/code_quality.md
index 69bdfe10e3f..9d44f416696 100644
--- a/doc/user/project/merge_requests/code_quality.md
+++ b/doc/user/project/merge_requests/code_quality.md
@@ -66,6 +66,19 @@ will scan your source code for code quality issues. The report will be saved as
that you can later download and analyze. Due to implementation limitations we always
take the latest Code Quality artifact available.
+It is also possible to override the URL to the Code Quality image by
+setting the `CODE_QUALITY_IMAGE` variable. This is particularly useful if you want
+to lock in a specific version of Code Quality, or use a fork of it:
+
+```yaml
+include:
+ - template: Code-Quality.gitlab-ci.yml
+
+code_quality:
+ variables:
+ CODE_QUALITY_IMAGE: "registry.example.com/codequality-fork:latest"
+```
+
By default, report artifacts are not downloadable. If you need them downloadable on the
job details page, you can add `gl-code-quality-report.json` to the artifact paths like so:
@@ -125,6 +138,33 @@ code_quality:
codequality: gl-code-quality-report.json
```
+In GitLab 12.6, Code Quality switched to the
+[new versioning scheme](https://gitlab.com/gitlab-org/security-products/codequality/merge_requests/38).
+It is highly recommended to include the Code Quality template as shown in the
+[example configuration](#example-configuration), which uses the new versioning scheme.
+If not using the template, the `SP_VERSION` variable can be hardcoded to use the
+new image versions:
+
+```yaml
+code_quality:
+ image: docker:stable
+ variables:
+ DOCKER_DRIVER: overlay2
+ SP_VERSION: 0.85.6
+ allow_failure: true
+ services:
+ - docker:stable-dind
+ script:
+ - docker run
+ --env SOURCE_CODE="$PWD"
+ --volume "$PWD":/code
+ --volume /var/run/docker.sock:/var/run/docker.sock
+ "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
+ artifacts:
+ reports:
+ codequality: gl-code-quality-report.json
+```
+
For GitLab 11.4 and earlier, the job should look like:
```yaml
diff --git a/doc/user/project/merge_requests/creating_merge_requests.md b/doc/user/project/merge_requests/creating_merge_requests.md
index 1dec58a8bb0..5b4c6d22c80 100644
--- a/doc/user/project/merge_requests/creating_merge_requests.md
+++ b/doc/user/project/merge_requests/creating_merge_requests.md
@@ -1,124 +1,165 @@
---
-type: index, reference
+type: howto
+description: "How to create Merge Requests in GitLab."
+disqus_identifier: 'https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html'
---
-# Creating merge requests
+# How to create a merge request
-Merge requests are the primary method of making changes to files in a GitLab project.
-Changes are proposed by creating and submitting a merge request, which is then
-[reviewed, and accepted (or rejected)](reviewing_and_managing_merge_requests.md),
-all within GitLab.
+Before creating a merge request, read through an
+[introduction to Merge Requests](getting_started.md)
+to familiarize yourself with the concept, the terminology,
+and to learn what you can do with them.
-## Creating new merge requests
+Every merge request starts by creating a branch. You can either
+do it locally through the command line, via a Git CLI application,
+or through the GitLab UI.
-You can start creating a new merge request by clicking the **New merge request** button
-on the **Merge Requests** page in a project. Then you must choose the source project and
-branch that contain your changes, and the target project and branch where you want to merge
-the changes into. Click on **Compare branches and continue** to go to the next step
-and start filling in the merge request details.
+This document describes the several ways to create a merge request.
-When viewing the commits on a branch other than master in **Repository > Commits**, you
-can click on the **Create merge request** button, and a new merge request will be started
-using the current branch as the source, and `master` in the current project as the target.
+When you start a new merge request, regarless of the method,
+you'll be taken to the [**New Merge Request** page](#new-merge-request-page)
+to fill it with information about the merge request.
-If you have recently pushed changes to GitLab, the **Create merge request** button will
-also appear in the top right of the:
+If you push a new branch to GitLab, also regardless of the method,
+you can click the [**Create Merge Request**](#create-merge-request-button)
+button and start a merge request from there.
+
+## New Merge Request page
+
+On the **New Merge Request** page, start by filling in the title
+and description for the merge request. If there are are already
+commits on the branch, the title will be pre-filled with the first
+line of the first commit message, and the description will be
+pre-filled with any additional lines in the commit message.
+The title is the only field that is mandatory in all cases.
+
+From there, you can fill it with information (title, description,
+assignee(s), milestone, labels, approvers) and click **Create Merge Request**.
+
+From that initial screen, you can also see all the commits,
+pipelines, and file changes pushed to your branch before submitting
+the merge request.
+
+![New Merge Request page](img/new_merge_request_page_v12_6.png)
+
+TIP: **Tip:**
+You can push one or more times to your branch in GitLab before
+creating the merge request.
+
+## Create Merge Request button
+
+Once you have pushed a new branch to GitLab, visit your repository
+in GitLab and to see a call-to-action at the top of your screen
+from which you can click the button **Create Merge Request**.
+
+![Create Merge Request button](img/create_merge_request_button_v12_6.png)
+
+You can also see the **Create merge request** button in the top-right of the:
- **Project** page.
- **Repository > Files** page.
- **Merge Requests** page.
-In this case, the merge request will use the most recent branch you pushed changes
-to as the source branch, and `master` in the current project as the target.
+In this case, GitLab will use the most recent branch you pushed
+changes to as the source branch, and the default branch in the current
+project as the target.
-You can also [create a new merge request directly from an issue](../repository/web_editor.md#create-a-new-branch-from-an-issue).
+## New merge request by adding, editing, and uploading a file
-## Workflow for new merge requests
+When you choose to edit, add, or upload a file through the GitLab UI,
+at the end of the file you'll see the option to add the **Commit message**,
+to select the **Target branch** of that commit, and the checkbox to
+**Start new a merge request with these changes**.
-On the **New Merge Request** page, you can start by filling in the title and description
-for the merge request. If there are are already commits on the branch, the title will
-be pre-filled with the first line of the first commit message, and the description will
-be pre-filled with any additional lines in the commit message. The title is the only
-field that is mandatory in all cases.
+Similarly, if you change files through the Web IDE, when you navigate to **Commit** on the left-hand sidebar, you'll see these same options.
-From here, you can also:
+Once you have added, edited, or uploaded the file:
-- Set the merge request as a [work in progress](work_in_progress_merge_requests.md).
-- Select the [assignee](#assignee), or [assignees](#multiple-assignees-starter). **(STARTER)**
-- Select a [milestone](../milestones/index.md).
-- Select [labels](../labels.md).
-- Add any [merge request dependencies](merge_request_dependencies.md). **(PREMIUM)**
-- Select [approval options](merge_request_approvals.md). **(STARTER)**
-- Verify the source and target branches are correct.
-- Enable the [delete source branch when merge request is accepted](#deleting-the-source-branch) option.
-- Enable the [squash commits when merge request is accepted](squash_and_merge.md) option.
-- If the merge request is from a fork, enable [Allow collaboration on merge requests across forks](allow_collaboration.md).
+1. Describe your changes in the commit message.
+1. Select an existing branch to add your commit into, or, if you'd like to create a new branch, type the new branch name (without spaces, capital letters, or special chars).
+1. Keep the checkbox checked to start a new merge request straightaway, or, uncheck it to add more changes to that branch before starting the merge request.
+1. Click **Commit changes**.
-Many of these can be set when pushing changes from the command line, with
-[Git push options](../push_options.md).
+If you chose to start a merge request, you'll be taken to the
+[**New Merge Request** page](#new-merge-request-page), from
+which you can fill it in with information and submit the merge request.
-### Merge requests to close issues
+The merge request will target the default branch of the repository.
+If you want to change it, you can do it later by editing the merge request.
-If the merge request is being created to resolve an issue, you can add a note in the
-description which will set it to [automatically close the issue](../issues/managing_issues.md#closing-issues-automatically)
-when merged.
+## New merge request from a new branch created through the UI
-If the issue is [confidential](../issues/confidential_issues.md), you may want to
-use a different workflow for [merge requests for confidential issues](../issues/confidential_issues.md#merge-requests-for-confidential-issues),
-to prevent confidential information from being exposed.
+To quickly start working on files through the GitLab UI,
+navigate to your project's **Repository > Branches** and click
+**New branch**. A new branch will be created and you can start
+editing files.
-## Assignee
+Once committed and pushed, you can click on the [**Create Merge Request**](#create-merge-request-button)
+button to open the [**New Merge Request** page](#new-merge-request-page).
+A new merge request will be started using the current branch as the source,
+and the default branch in the current project as the target.
-Choose an assignee to designate someone as the person responsible for the first
-[review of the merge request](reviewing_and_managing_merge_requests.md). Open the
-drop down box to search for the user you wish to assign, and the merge request will be
-added to their [assigned merge request list](../../search/index.md#issues-and-merge-requests).
+## New merge request from you local environment
-### Multiple assignees **(STARTER)**
+Assuming you have your repository cloned into your computer and you'd
+like to start working on changes to files, start by creating and
+checking out a new branch:
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/2004) in [GitLab Starter 11.11](https://about.gitlab.com/pricing/).
+```bash
+git checkout -b my-new-branch
+```
-Multiple people often review merge requests at the same time. GitLab allows you to
-have multiple assignees for merge requests to indicate everyone that is reviewing or
-accountable for it.
+Work on your file changes, stage, and commit them:
-![multiple assignees for merge requests sidebar](img/multiple_assignees_for_merge_requests_sidebar.png)
+```bash
+git add .
+git commit -m "My commit message"
+```
-To assign multiple assignees to a merge request:
+Once you're done, [push your branch to GitLab](../../../gitlab-basics/start-using-git.md#send-changes-to-gitlabcom):
-1. From a merge request, expand the right sidebar and locate the **Assignees** section.
-1. Click on **Edit** and from the dropdown menu, select as many users as you want
- to assign the merge request to.
+```bash
+git push origin my-new-branch
+```
-Similarly, assignees are removed by deselecting them from the same dropdown menu.
+In the output, GitLab will prompt you with a direct link for creating
+a merge request:
-It's also possible to manage multiple assignees:
+```bash
+...
+remote: To create a merge request for docs-new-merge-request, visit:
+remote: https://gitlab-instance.com/my-group/my-project/merge_requests/new?merge_request%5Bsource_branch%5D=my-new-branch
+```
-- When creating a merge request.
-- Using [quick actions](../quick_actions.md#quick-actions-for-issues-merge-requests-and-epics).
+Copy that link and paste it in your browser, and the [**New Merge Request page**](#new-merge-request-page)
+will be displayed.
-## Deleting the source branch
+There is also a number of [flags you can add to commands when pushing through the command line](../push_options.md) to reduce the need for editing merge requests manually through the UI.
-When creating a merge request, select the "Delete source branch when merge
-request accepted" option and the source branch will be deleted when the merge
-request is merged. To make this option enabled by default for all new merge
-requests, enable it in the [project's settings](../settings/index.md#merge-request-settings).
+If you didn't push your branch to GitLab through the command line
+(for example, you used a Git CLI application to push your changes),
+you can create a merge request through the GitLab UI by clicking
+the [**Create Merge Request**](#create-merge-request-button) button.
-This option is also visible in an existing merge request next to the merge
-request button and can be selected/deselected before merging. It's only visible
-to users with [Maintainer permissions](../../permissions.md) in the source project.
+## New merge request from an issue
-If the user viewing the merge request does not have the correct permissions to
-delete the source branch and the source branch is set for deletion, the merge
-request widget will show the "Deletes source branch" text.
+You can also [create a new merge request directly from an issue](../repository/web_editor.md#create-a-new-branch-from-an-issue).
-![Delete source branch status](img/remove_source_branch_status.png)
+## New merge request from the Merge Requests page
-## Create new merge requests by email
+You can start creating a new merge request by clicking the
+**New merge request** button on the **Merge Requests** page in a project.
+Then choose the source project and branch that contain your changes,
+and the target project and branch where you want to merge the changes into.
+Click on **Compare branches and continue** to go to the
+[**New Merge Request** page](#new-merge-request-page) and fill in the details.
+
+## New merge request by email **(CORE ONLY)**
_This feature needs [incoming email](../../../administration/incoming_email.md)
-to be configured by a GitLab administrator to be available for CE/EE users, and
-it's available on GitLab.com._
+to be configured by a GitLab administrator to be available._ It isn't
+available in GitLab.com.
You can create a new merge request by sending an email to a user-specific email
address. The address can be obtained on the merge requests page by clicking on
@@ -131,7 +172,7 @@ this feature. If it's not enabled to your instance, you may ask your GitLab
administrator to do so.
This is a private email address, generated just for you. **Keep it to yourself**
-as anyone who gets ahold of it can create issues or merge requests as if they were you.
+as anyone who has it can create issues or merge requests as if they were you.
You can add this address to your contact list for easy access.
![Create new merge requests by email](img/create_from_email.png)
@@ -156,3 +197,7 @@ created from the repository's HEAD or the specified target branch to
apply the patches. The target branch can be specified using the
[`/target_branch` quick action](../quick_actions.md). If the source
branch already exists, the patches will be applied on top of it.
+
+## Reviewing and managing Merge Requests
+
+Once you have submitted a merge request, it can be [reviewed and managed](reviewing_and_managing_merge_requests.md) through GitLab.
diff --git a/doc/user/project/merge_requests/getting_started.md b/doc/user/project/merge_requests/getting_started.md
new file mode 100644
index 00000000000..0ab8d31403e
--- /dev/null
+++ b/doc/user/project/merge_requests/getting_started.md
@@ -0,0 +1,151 @@
+---
+type: index, reference
+description: "Getting started with Merge Requests."
+---
+
+# Getting started with Merge Requests
+
+A Merge Request (**MR**) is the basis of GitLab as a code
+collaboration and version control.
+
+When working in a Git-based platform, you can use branching
+strategies to collaborate on code.
+
+A repository is composed by its _default branch_, which contains
+the major version of the codebase, from which you create minor
+branches, also called _feature branches_, to propose changes to
+the codebase without introducing them directly into the major
+version of the codebase.
+
+Branching is especially important when collaborating with others,
+avoiding changes to be pushed directly to the default branch
+without prior reviews, tests, and approvals.
+
+When you create a new feature branch, change the files, and push
+it to GitLab, you have the option to create a **Merge Request**,
+which is essentially a _request_ to merge one branch into another.
+
+The branch you added your changes into is called _source branch_
+while the branch you request to merge your changes into is
+called _target branch_.
+
+The target branch can be the default or any other branch, depending
+on the branching strategies you choose.
+
+In a merge request, beyond visualizing the differences between the
+original content and your proposed changes, you can execute a
+[significant number of tasks](#what-you-can-do-with-merge-requests)
+before concluding your work and merging the merge request.
+
+You can watch our [GitLab Flow video](https://www.youtube.com/watch?v=InKNIvky2KE) for
+a quick overview of working with merge requests.
+
+## How to create a merge request
+
+Learn the various ways to [create a merge request](creating_merge_requests.md).
+
+## What you can do with merge requests
+
+When you start a new merge request, you can immediately include the following
+options, or add them later by clicking the **Edit** button on the merge
+request's page at the top-right side:
+
+- [Assign](#assignee) the merge request to a colleague for review. With GitLab Starter and higher tiers, you can [assign it to more than one person at a time](#multiple-assignees-starter).
+- Set a [milestone](../milestones/index.md) to track time-sensitive changes.
+- Add [labels](../labels.md) to help contextualize and filter your merge requests over time.
+- Require [approval](merge_request_approvals.md) from your team. **(STARTER)**
+- [Close issues automatically](#merge-requests-to-close-issues) when they are merged.
+- Enable the [delete source branch when merge request is accepted](#deleting-the-source-branch) option to keep your repository clean.
+- Enable the [squash commits when merge request is accepted](squash_and_merge.md) option to combine all the commits into one before merging, thus keep a clean commit history in your repository.
+- Set the merge request as a [Work In Progress (WIP)](work_in_progress_merge_requests.md) to avoid accidental merges before it is ready.
+
+Once you have created the merge request, you can also:
+
+- [Discuss](../../discussions/index.md) your implementation with your team in the merge request thread.
+- [Perform inline code reviews](reviewing_and_managing_merge_requests.md#perform-inline-code-reviews).
+- Add [merge request dependencies](merge_request_dependencies.md) to restrict it to be merged only when other merge requests have been merged. **(PREMIUM)**
+- Preview continuous integration [pipelines on the merge request widget](reviewing_and_managing_merge_requests.md#pipeline-status-in-merge-requests-widgets).
+- Preview how your changes look directly on your deployed application with [Review Apps](reviewing_and_managing_merge_requests.md#live-preview-with-review-apps).
+- [Allow collaboration on merge requests across forks](allow_collaboration.md).
+- Perform a [Review](../../discussions/index.md#merge-request-reviews-premium) in order to create multiple comments on a diff and publish them once you're ready. **(PREMIUM)**
+- Add [code suggestions](../../discussions/index.md#suggest-changes) to change the content of merge requests directly into merge request threads, and easily apply them to the codebase directly from the UI.
+- Add a time estimation and the time spent with that merge request with [Time Tracking](../time_tracking.md#time-tracking).
+
+Many of these can be set when pushing changes from the command line,
+with [Git push options](../push_options.md).
+
+See also other [features associated to merge requests](reviewing_and_managing_merge_requests.md#associated-features).
+
+### Assignee
+
+Choose an assignee to designate someone as the person responsible
+for the first [review of the merge request](reviewing_and_managing_merge_requests.md).
+Open the drop down box to search for the user you wish to assign,
+and the merge request will be added to their
+[assigned merge request list](../../search/index.md#issues-and-merge-requests).
+
+#### Multiple assignees **(STARTER)**
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/2004) in [GitLab Starter 11.11](https://about.gitlab.com/pricing/).
+
+Multiple people often review merge requests at the same time.
+GitLab allows you to have multiple assignees for merge requests
+to indicate everyone that is reviewing or accountable for it.
+
+![multiple assignees for merge requests sidebar](img/multiple_assignees_for_merge_requests_sidebar.png)
+
+To assign multiple assignees to a merge request:
+
+1. From a merge request, expand the right sidebar and locate the **Assignees** section.
+1. Click on **Edit** and from the dropdown menu, select as many users as you want
+ to assign the merge request to.
+
+Similarly, assignees are removed by deselecting them from the same
+dropdown menu.
+
+It is also possible to manage multiple assignees:
+
+- When creating a merge request.
+- Using [quick actions](../quick_actions.md#quick-actions-for-issues-merge-requests-and-epics).
+
+### Merge requests to close issues
+
+If the merge request is being created to resolve an issue, you can
+add a note in the description which sets it to
+[automatically close the issue](../issues/managing_issues.md#closing-issues-automatically)
+when merged.
+
+If the issue is [confidential](../issues/confidential_issues.md),
+you may want to use a different workflow for
+[merge requests for confidential issues](../issues/confidential_issues.md#merge-requests-for-confidential-issues)
+to prevent confidential information from being exposed.
+
+### Deleting the source branch
+
+When creating a merge request, select the
+**Delete source branch when merge request accepted** option, and the source
+branch is deleted when the merge request is merged. To make this option
+enabled by default for all new merge requests, enable it in the
+[project's settings](../settings/index.md#merge-request-settings).
+
+This option is also visible in an existing merge request next to
+the merge request button and can be selected or deselected before merging.
+It is only visible to users with [Maintainer permissions](../../permissions.md)
+in the source project.
+
+If the user viewing the merge request does not have the correct
+permissions to delete the source branch and the source branch
+is set for deletion, the merge request widget displays the
+**Deletes source branch** text.
+
+![Delete source branch status](img/remove_source_branch_status.png)
+
+## Recommendations and best practices for Merge Requests
+
+- When working locally in your branch, add multiple commits and only push when
+ you're done, so GitLab runs only one pipeline for all the commits pushed
+ at once. By doing so, you save pipeline minutes.
+- Delete feature branches on merge or after merging them to keep your repository clean.
+- Take one thing at a time and ship the smallest changes possible. By doing so,
+ you'll have faster reviews and your changes will be less prone to errors.
+- Do not use capital letters nor special chars in branch names.
diff --git a/doc/user/project/merge_requests/img/create_merge_request_button_v12_6.png b/doc/user/project/merge_requests/img/create_merge_request_button_v12_6.png
new file mode 100644
index 00000000000..bcbee10e1b7
--- /dev/null
+++ b/doc/user/project/merge_requests/img/create_merge_request_button_v12_6.png
Binary files differ
diff --git a/doc/user/project/merge_requests/img/dependencies_edit_inaccessible_v12_4.png b/doc/user/project/merge_requests/img/dependencies_edit_inaccessible_v12_4.png
index 3699ffd16b4..5ced2fa812f 100644
--- a/doc/user/project/merge_requests/img/dependencies_edit_inaccessible_v12_4.png
+++ b/doc/user/project/merge_requests/img/dependencies_edit_inaccessible_v12_4.png
Binary files differ
diff --git a/doc/user/project/merge_requests/img/dependencies_edit_v12_4.png b/doc/user/project/merge_requests/img/dependencies_edit_v12_4.png
index beb452e80cf..4edf0648794 100644
--- a/doc/user/project/merge_requests/img/dependencies_edit_v12_4.png
+++ b/doc/user/project/merge_requests/img/dependencies_edit_v12_4.png
Binary files differ
diff --git a/doc/user/project/merge_requests/img/dependencies_view_v12_2.png b/doc/user/project/merge_requests/img/dependencies_view_v12_2.png
index e00231c839b..3dde15292c4 100644
--- a/doc/user/project/merge_requests/img/dependencies_view_v12_2.png
+++ b/doc/user/project/merge_requests/img/dependencies_view_v12_2.png
Binary files differ
diff --git a/doc/user/project/merge_requests/img/incrementally_expand_merge_request_diffs_v12_2.png b/doc/user/project/merge_requests/img/incrementally_expand_merge_request_diffs_v12_2.png
index ee94dbdea5c..e3a2ff7960c 100644
--- a/doc/user/project/merge_requests/img/incrementally_expand_merge_request_diffs_v12_2.png
+++ b/doc/user/project/merge_requests/img/incrementally_expand_merge_request_diffs_v12_2.png
Binary files differ
diff --git a/doc/user/project/merge_requests/img/merge_request_diff_v12_2.png b/doc/user/project/merge_requests/img/merge_request_diff_v12_2.png
index e56fbb9750f..7e23b7db309 100644
--- a/doc/user/project/merge_requests/img/merge_request_diff_v12_2.png
+++ b/doc/user/project/merge_requests/img/merge_request_diff_v12_2.png
Binary files differ
diff --git a/doc/user/project/merge_requests/img/new_merge_request_page_v12_6.png b/doc/user/project/merge_requests/img/new_merge_request_page_v12_6.png
new file mode 100644
index 00000000000..c0f2ba261cb
--- /dev/null
+++ b/doc/user/project/merge_requests/img/new_merge_request_page_v12_6.png
Binary files differ
diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md
index 203a2949243..0617e6bc74d 100644
--- a/doc/user/project/merge_requests/index.md
+++ b/doc/user/project/merge_requests/index.md
@@ -50,6 +50,8 @@ collaborating with that MR.
MRs also contain navigation tabs from which you can see the discussion happening on the thread,
the list of commits, the list of pipelines and jobs, the code changes and inline code reviews.
+To get started, read the [introduction to merge requests](getting_started.md).
+
## Merge request navigation tabs at the top
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/33813) in GitLab 12.6. This positioning is experimental.
@@ -76,72 +78,11 @@ Feature.disable(:mr_tabs_position)
## Creating merge requests
-While making changes to files in the `master` branch of a repository is possible, it is not
-the common workflow. In most cases, a user will make changes in a [branch](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell#_git_branching),
-then [create a merge request](creating_merge_requests.md) to request that the changes
-be merged into another branch (often the `master` branch).
-
-It is then [reviewed](#reviewing-and-managing-merge-requests), possibly updated after
-discussions and suggestions, and finally approved and merged into the target branch.
-Creating and reviewing merge requests is one of the most fundamental parts of working
-with GitLab.
-
-When [creating merge requests](creating_merge_requests.md), there are a number of features
-to be aware of:
-
-| Feature | Description |
-|-----------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| [Adding patches when creating a merge request via e-mail](creating_merge_requests.md#adding-patches-when-creating-a-merge-request-via-e-mail) | Add commits to a merge request created by e-mail, by adding patches as e-mail attachments. |
-| [Allow collaboration on merge requests across forks](allow_collaboration.md) | Allows the maintainers of an upstream project to collaborate on a fork, to make fixes or rebase branches before merging, reducing the back and forth of accepting community contributions. |
-| [Assignee](creating_merge_requests.md#assignee) | Add an assignee to indicate who is reviewing or accountable for it. |
-| [Automatic issue closing](../../project/issues/managing_issues.md#closing-issues-automatically) | Set a merge request to close defined issues automatically as soon as it is merged. |
-| [Create new merge requests by email](creating_merge_requests.md#create-new-merge-requests-by-email) | Create new merge requests by sending an email to a user-specific email address. |
-| [Deleting the source branch](creating_merge_requests.md#deleting-the-source-branch) | Select the "Delete source branch when merge request accepted" option and the source branch will be deleted when the merge request is merged. |
-| [Git push options](../push_options.md) | Use Git push options to create or update merge requests when pushing changes to GitLab with Git, without needing to use the GitLab interface. |
-| [Labels](../../project/labels.md) | Organize your issues and merge requests consistently throughout the project. |
-| [Merge request approvals](merge_request_approvals.md) **(STARTER)** | Set the number of necessary approvals and predefine a list of approvers that will need to approve every merge request in a project. |
-| [Merge Request dependencies](merge_request_dependencies.md) **(PREMIUM)** | Specify that a merge request depends on other merge requests, enforcing a desired order of merging. |
-| [Merge Requests for Confidential Issues](../issues/confidential_issues.md#merge-requests-for-confidential-issues) | Create merge requests to resolve confidential issues for preventing leakage or early release of sensitive data through regular merge requests. |
-| [Milestones](../../project/milestones/index.md) | Track merge requests to achieve a broader goal in a certain period of time. |
-| [Multiple assignees](creating_merge_requests.md#multiple-assignees-starter) **(STARTER)** | Have multiple assignees for merge requests to indicate everyone that is reviewing or accountable for it. |
-| [Squash and merge](squash_and_merge.md) | Squash all changes present in a merge request into a single commit when merging, to allow for a neater commit history. |
-| [Work In Progress merge requests](work_in_progress_merge_requests.md) | Prevent the merge request from being merged before it's ready |
+Learn [how to create a merge request](creating_merge_requests.md).
## Reviewing and managing merge requests
-Once a merge request has been [created](#creating-merge-requests) and submitted, there
-are many powerful features that you can use during the review process to make sure only
-the changes you want are merged into the repository.
-
-For managers and administrators, it is also important to be able to view and manage
-all the merge requests in a group or project. When [reviewing or managing merge requests](reviewing_and_managing_merge_requests.md),
-there are a number of features to be aware of:
-
-| Feature | Description |
-|-------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
-| [Bulk editing merge requests](../../project/bulk_editing.md) | Update the attributes of multiple merge requests simultaneously. |
-| [Cherry-pick changes](cherry_pick_changes.md) | Cherry-pick any commit in the UI by simply clicking the **Cherry-pick** button in a merged merge requests or a commit. |
-| [Commenting on any file line in merge requests](reviewing_and_managing_merge_requests.md#commenting-on-any-file-line-in-merge-requests) | Make comments directly on the exact line of a file you want to talk about. |
-| [Discuss changes in threads in merge requests reviews](../../discussions/index.md) | Keep track of the progress during a code review by making and resolving comments. |
-| [Fast-forward merge requests](fast_forward_merge.md) | For a linear Git history and a way to accept merge requests without creating merge commits |
-| [Find the merge request that introduced a change](versions.md) | When viewing the commit details page, GitLab will link to the merge request(s) containing that commit. |
-| [Ignore whitespace changes in Merge Request diff view](reviewing_and_managing_merge_requests.md#ignore-whitespace-changes-in-Merge-Request-diff-view) | Hide whitespace changes from the diff view for a to focus on more important changes. |
-| [Incrementally expand merge request diffs](reviewing_and_managing_merge_requests.md#incrementally-expand-merge-request-diffs) | View the content directly above or below a change, to better understand the context of that change. |
-| [Live preview with Review Apps](reviewing_and_managing_merge_requests.md#live-preview-with-review-apps) | Live preview the changes when Review Apps are configured for your project |
-| [Merge request diff file navigation](reviewing_and_managing_merge_requests.md#merge-request-diff-file-navigation) | Quickly jump to any changed file within the diff view. |
-| [Merge requests versions](versions.md) | Select and compare the different versions of merge request diffs |
-| [Merge when pipeline succeeds](merge_when_pipeline_succeeds.md) | Set a merge request that looks ready to merge to merge automatically when CI pipeline succeeds. |
-| [Perform a Review](../../discussions/index.md#merge-request-reviews-premium) **(PREMIUM)** | Start a review in order to create multiple comments on a diff and publish them once you're ready. |
-| [Pipeline status in merge requests](reviewing_and_managing_merge_requests.md#pipeline-status-in-merge-requests) | If using [GitLab CI/CD](../../../ci/README.md), see pre and post-merge pipelines information, and which deployments are in progress. |
-| [Post-merge pipeline status](reviewing_and_managing_merge_requests.md#post-merge-pipeline-status) | When a merge request is merged, see the post-merge pipeline status of the branch the merge request was merged into. |
-| [Resolve conflicts](resolve_conflicts.md) | GitLab can provide the option to resolve certain merge request conflicts in the GitLab UI. |
-| [Revert changes](revert_changes.md) | Revert changes from any commit from within a merge request. |
-| [Semi-linear history merge requests](reviewing_and_managing_merge_requests.md#semi-linear-history-merge-requests) | Enable semi-linear history merge requests as another security layer to guarantee the pipeline is passing in the target branch |
-| [Suggest changes](../../discussions/index.md#suggest-changes) | Add suggestions to change the content of merge requests directly into merge request threads, and easily apply them to the codebase directly from the UI. |
-| [Time Tracking](../time_tracking.md#time-tracking) | Add a time estimation and the time spent with that merge request. |
-| [View changes between file versions](reviewing_and_managing_merge_requests.md#view-changes-between-file-versions) | View what will be changed when a merge request is merged. |
-| [View group merge requests](reviewing_and_managing_merge_requests.md#view-merge-requests-for-all-projects-in-a-group) | List and view the merge requests within a group. |
-| [View project merge requests](reviewing_and_managing_merge_requests.md#view-project-merge-requests) | List and view the merge requests within a project. |
+See the features at your disposal to [review and manage merge requests](reviewing_and_managing_merge_requests.md).
## Testing and reports in merge requests
diff --git a/doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md b/doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md
index 97c16a9794d..21c8b5c682b 100644
--- a/doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md
+++ b/doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md
@@ -13,7 +13,7 @@ which is then reviewed, and accepted (or rejected).
View all the merge requests within a project by navigating to **Project > Merge Requests**.
When you access your project's merge requests, GitLab will present them in a list,
-and you can use the tabs available to quickly filter by open and closed. You can also [search and filter the results](../../search/index.md#issues-and-merge-requests-per-project).
+and you can use the tabs available to quickly filter by open and closed. You can also [search and filter the results](../../search/index.md#filtering-issue-and-merge-request-lists).
![Project merge requests list view](img/project_merge_requests_list_view.png)
@@ -21,7 +21,7 @@ and you can use the tabs available to quickly filter by open and closed. You can
View merge requests in all projects in the group, including all projects of all descendant subgroups of the group. Navigate to **Group > Merge Requests** to view these merge requests. This view also has the open and closed merge requests tabs.
-You can [search and filter the results](../../search/index.md#issues-and-merge-requests-per-group) from here.
+You can [search and filter the results](../../search/index.md#filtering-issue-and-merge-request-lists) from here.
![Group Issues list view](img/group_merge_requests_list_view.png)
@@ -85,7 +85,7 @@ specific commit page.
You can append `?w=1` while on the diffs page of a merge request to ignore any
whitespace changes.
-## Commenting on any file line in merge requests
+## Perform inline code reviews
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/13950) in GitLab 11.5.
@@ -94,20 +94,7 @@ in a Merge Request. To do so, click the **...** button in the gutter of the Merg
![Comment on any diff file line](img/comment-on-any-diff-line.png)
-## Live preview with Review Apps
-
-If you configured [Review Apps](https://about.gitlab.com/product/review-apps/) for your project,
-you can preview the changes submitted to a feature-branch through a merge request
-in a per-branch basis. No need to checkout the branch, install and preview locally;
-all your changes will be available to preview by anyone with the Review Apps link.
-
-With GitLab's [Route Maps](../../../ci/review_apps/index.md#route-maps) set, the
-merge request widget takes you directly to the pages changed, making it easier and
-faster to preview proposed modifications.
-
-[Read more about Review Apps](../../../ci/review_apps/index.md).
-
-## Pipeline status in merge requests
+## Pipeline status in merge requests widgets
If you've set up [GitLab CI/CD](../../../ci/README.md) in your project,
you will be able to see:
@@ -135,6 +122,37 @@ be disabled. If the pipeline fails to deploy, the deployment info will be hidden
For more information, [read about pipelines](../../../ci/pipelines.md).
+### Merge when pipeline succeeds (MWPS)
+
+Set a merge request that looks ready to merge to [merge automatically when CI pipeline succeeds](merge_when_pipeline_succeeds.md).
+
+### Live preview with Review Apps
+
+If you configured [Review Apps](https://about.gitlab.com/product/review-apps/) for your project,
+you can preview the changes submitted to a feature-branch through a merge request
+in a per-branch basis. No need to checkout the branch, install and preview locally;
+all your changes will be available to preview by anyone with the Review Apps link.
+
+With GitLab's [Route Maps](../../../ci/review_apps/index.md#route-maps) set, the
+merge request widget takes you directly to the pages changed, making it easier and
+faster to preview proposed modifications.
+
+[Read more about Review Apps](../../../ci/review_apps/index.md).
+
+## Associated features
+
+There is also a large number of features to associated to merge requests:
+
+| Feature | Description |
+|-------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
+| [Bulk editing merge requests](../../project/bulk_editing.md) | Update the attributes of multiple merge requests simultaneously. |
+| [Cherry-pick changes](cherry_pick_changes.md) | Cherry-pick any commit in the UI by simply clicking the **Cherry-pick** button in a merged merge requests or a commit. |
+| [Fast-forward merge requests](fast_forward_merge.md) | For a linear Git history and a way to accept merge requests without creating merge commits |
+| [Find the merge request that introduced a change](versions.md) | When viewing the commit details page, GitLab will link to the merge request(s) containing that commit. |
+| [Merge requests versions](versions.md) | Select and compare the different versions of merge request diffs |
+| [Resolve conflicts](resolve_conflicts.md) | GitLab can provide the option to resolve certain merge request conflicts in the GitLab UI. |
+| [Revert changes](revert_changes.md) | Revert changes from any commit from within a merge request. |
+
## Troubleshooting
Sometimes things don't go as expected in a merge request, here are some