Commit f76a4869 authored by Marcel Amirault's avatar Marcel Amirault

Add use cases back to MR docs

parent 0ee30ffc
...@@ -12,10 +12,10 @@ all within GitLab. ...@@ -12,10 +12,10 @@ all within GitLab.
## Creating new merge requests ## Creating new merge requests
You can start creating a new merge request by clicking the **New merge request** button 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 a source project and on the **Merge Requests** page in a project. Then you must choose the source project and
branch with your changes, and the target project and branch where you want to merge 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 start filling in the the changes into. Click on **Compare branches and continue** to go to the next step
merge request details. and start filling in the merge request details.
When viewing the commits on a branch in **Repository > Commits**, you can click on When viewing the commits on a branch in **Repository > Commits**, you can click on
the **Create merge request** button, and a new merge request will be started using the **Create merge request** button, and a new merge request will be started using
...@@ -32,10 +32,10 @@ In this case, the merge request will use the most recent branch you pushed chang ...@@ -32,10 +32,10 @@ In this case, the merge request will use the most recent branch you pushed chang
to as the source branch, and `master` in the current project as the target. to as the source branch, and `master` in the current project as the target.
On the **New Merge Request** page, you can start by filling in the title and description On the **New Merge Request** page, you can start by filling in the title and description
for the merge request. If there are commits on the branch, the title will be pre-filled for the merge request. If there are are already commits on the branch, the title will
with the first line of the first commit message, and the description will be pre-filled with be pre-filled with the first line of the first commit message, and the description will
any additional lines in the commit message. The title is the only field that is mandatory be pre-filled with any additional lines in the commit message. The title is the only
in all cases. field that is mandatory in all cases.
From here, you can also: From here, you can also:
......
...@@ -13,6 +13,30 @@ A Merge Request (**MR**) is the basis of GitLab as a code collaboration and vers ...@@ -13,6 +13,30 @@ A Merge Request (**MR**) is the basis of GitLab as a code collaboration and vers
control platform. It is as simple as the name implies: a _request_ to _merge_ one control platform. It is as simple as the name implies: a _request_ to _merge_ one
branch into another. branch into another.
## Use cases
A. Consider you are a software developer working in a team:
1. You checkout a new branch, and submit your changes through a merge request
1. You gather feedback from your team
1. You work on the implementation optimizing code with [Code Quality reports](code_quality.md) **(STARTER)**
1. You verify your changes with [JUnit test reports](../../../ci/junit_test_reports.md) in GitLab CI/CD
1. You avoid using dependencies whose license is not compatible with your project with [License Compliance reports](../../application_security/license_compliance/index.md) **(ULTIMATE)**
1. You request the [approval](merge_request_approvals.md) from your manager
1. Your manager pushes a commit with their final review, [approves the merge request](merge_request_approvals.md), and sets it to [merge when pipeline succeeds](merge_when_pipeline_succeeds.md) (Merge Request Approvals are available in GitLab Starter)
1. Your changes get deployed to production with [manual actions](../../../ci/yaml/README.md#whenmanual) for GitLab CI/CD
1. Your implementations were successfully shipped to your customer
B. Consider you're a web developer writing a webpage for your company's website:
1. You checkout a new branch, and submit a new page through a merge request
1. You gather feedback from your reviewers
1. Your changes are previewed with [Review Apps](../../../ci/review_apps/index.md)
1. You request your web designers for their implementation
1. You request the [approval](merge_request_approvals.md) from your manager **(STARTER)**
1. Once approved, your merge request is [squashed and merged](squash_and_merge.md), and [deployed to staging with GitLab Pages](https://about.gitlab.com/blog/2016/08/26/ci-deployment-and-environments/)
1. Your production team [cherry picks](cherry_pick_changes.md) the merge commit into production
## Creating merge requests ## Creating merge requests
While making changes to files in the `master` branch of a repository is possible, it is not While making changes to files in the `master` branch of a repository is possible, it is not
...@@ -32,7 +56,7 @@ to be aware of: ...@@ -32,7 +56,7 @@ to be aware of:
|-----------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |-----------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [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. | | [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. | | [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. |
| [Automatically 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. | | [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. | | [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. | | [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. | | [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. |
...@@ -53,15 +77,15 @@ to be aware of: ...@@ -53,15 +77,15 @@ to be aware of:
## Reviewing and managing merge requests ## Reviewing and managing merge requests
Once a merge request has been [created](#creating-merge-requests) and submitted, there Once a merge request has been [created](#creating-merge-requests) and submitted, there
are many powerful features to improve the review process, and make sure only the changes are many powerful features that you can use during the review process to make sure only
you want are merged into the repository. the changes you want are merged into the repository.
It is also important to be able to view and manage all the merge requests in a group For managers and administrators, it is also important to be able to view and manage
or project. When [reviewing and managing merge requests](reviewing_and_managing_merge_requests.md), 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: there are a number of features to be aware of:
| Feature | Description | | Feature | Description |
|-----------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------| |-----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Allow collaboration](allow_collaboration.md) | Allow the members of an upstream project to make small fixes or rebase branches before merging, reducing the back and forth of accepting external contributions. | | [Allow collaboration](allow_collaboration.md) | Allow the members of an upstream project to make small fixes or rebase branches before merging, reducing the back and forth of accepting external contributions. |
| [Bulk editing merge requests](../../project/bulk_editing.md) | Update the attributes of multiple merge requests simultaneously. | | [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. | | [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. |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment