From 526a21698184706e3ed85e8a4c96213f101e2d5e Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Fri, 18 Aug 2017 20:21:03 +0000 Subject: Delete issue_tracker.png --- doc/user/project/issues/img/issue_tracker.png | Bin 37037 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100755 doc/user/project/issues/img/issue_tracker.png diff --git a/doc/user/project/issues/img/issue_tracker.png b/doc/user/project/issues/img/issue_tracker.png deleted file mode 100755 index ab25cb64d13..00000000000 Binary files a/doc/user/project/issues/img/issue_tracker.png and /dev/null differ -- cgit v1.2.1 From d838f86ff84c321bed0d7d69ae3bc53b5c3c6be6 Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Fri, 18 Aug 2017 20:23:12 +0000 Subject: group_issues_list_view.png --- doc/user/project/issues/img/group_issues_list_view.png | Bin 0 -> 545504 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/user/project/issues/img/group_issues_list_view.png diff --git a/doc/user/project/issues/img/group_issues_list_view.png b/doc/user/project/issues/img/group_issues_list_view.png new file mode 100644 index 00000000000..c6a70e58a17 Binary files /dev/null and b/doc/user/project/issues/img/group_issues_list_view.png differ -- cgit v1.2.1 From 842b63481b2bc90cba1d2267a118dfb538af3a69 Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Fri, 18 Aug 2017 20:23:20 +0000 Subject: Delete group_issues_list_view.png --- doc/user/project/issues/img/group_issues_list_view.png | Bin 545504 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 doc/user/project/issues/img/group_issues_list_view.png diff --git a/doc/user/project/issues/img/group_issues_list_view.png b/doc/user/project/issues/img/group_issues_list_view.png deleted file mode 100644 index c6a70e58a17..00000000000 Binary files a/doc/user/project/issues/img/group_issues_list_view.png and /dev/null differ -- cgit v1.2.1 From 8158f980aa7897aee0ca5202e942273541e29906 Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Fri, 18 Aug 2017 20:24:47 +0000 Subject: group_issues_list_view.png --- doc/user/project/issues/img/group_issues_list_view.png | Bin 0 -> 265130 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/user/project/issues/img/group_issues_list_view.png diff --git a/doc/user/project/issues/img/group_issues_list_view.png b/doc/user/project/issues/img/group_issues_list_view.png new file mode 100644 index 00000000000..5d20e8cbc89 Binary files /dev/null and b/doc/user/project/issues/img/group_issues_list_view.png differ -- cgit v1.2.1 From fe18ec58ec688f4e79eccdd946f98b7b659615ea Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Fri, 18 Aug 2017 20:25:02 +0000 Subject: project_issues_list_view.png --- .../project/issues/img/project_issues_list_view.png | Bin 0 -> 309131 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/user/project/issues/img/project_issues_list_view.png diff --git a/doc/user/project/issues/img/project_issues_list_view.png b/doc/user/project/issues/img/project_issues_list_view.png new file mode 100644 index 00000000000..2fcc9e8d9da Binary files /dev/null and b/doc/user/project/issues/img/project_issues_list_view.png differ -- cgit v1.2.1 From 8c650dc629ef4aac0180d5af53f63d948f08f4c0 Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Fri, 18 Aug 2017 20:26:49 +0000 Subject: Update issue docs --- doc/user/project/issues/index.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/doc/user/project/issues/index.md b/doc/user/project/issues/index.md index 1f78849a92c..dedd02396ab 100644 --- a/doc/user/project/issues/index.md +++ b/doc/user/project/issues/index.md @@ -1,13 +1,13 @@ # Issues -The GitLab Issue Tracker is an advanced and complete tool +GitLab issues is an advanced and complete tool for tracking the evolution of a new idea or the process of solving a problem. It allows you, your team, and your collaborators to share and discuss proposals before and while implementing them. -Issues and the GitLab Issue Tracker are available in all +GitLab issues is available in all [GitLab Products](https://about.gitlab.com/products/) as part of the [GitLab Workflow](https://about.gitlab.com/2016/10/25/gitlab-workflow-an-overview/). @@ -46,13 +46,20 @@ Create [issue templates](#issue-templates) to make collaboration consistent and containing all information you need. For example, you can create a template for feature proposals and another one for bug reports. -## Issue Tracker +## Issue list views, searching, and filtering -The issue tracker is the collection of opened and closed issues created in a project. +View all the issues within a project by navigating to **Project > Issues**. +There are tabs to quickly filter by open and closed issues. -![Issue tracker](img/issue_tracker.png) +![Project issues list view](img/project_issues_list_view.png) -Find the issue tracker by navigating to your **Project's Dashboard** > **Issues**. +View all the issues in a group (that is, all the issues across all projects in that +group) by navigating to **Group > Issues**. This view also has the open and closed +issue tabs. + +![Group Issues list view](img/group_issues_list_view.png) + +In both these list views, [search and filter the results](). ## GitLab Issues Functionalities -- cgit v1.2.1 From c32194dca0afed5c6e440ffe2e32d9bedc097ddb Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Fri, 18 Aug 2017 20:32:20 +0000 Subject: group_merge_requests_list_view.png --- .../img/group_merge_requests_list_view.png | Bin 0 -> 283066 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/user/project/merge_requests/img/group_merge_requests_list_view.png diff --git a/doc/user/project/merge_requests/img/group_merge_requests_list_view.png b/doc/user/project/merge_requests/img/group_merge_requests_list_view.png new file mode 100644 index 00000000000..02a88d0112f Binary files /dev/null and b/doc/user/project/merge_requests/img/group_merge_requests_list_view.png differ -- cgit v1.2.1 From ad99fe5df0f79eea421edbbea0887d81a5606f96 Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Fri, 18 Aug 2017 20:32:37 +0000 Subject: project_merge_requests_list_view.png --- .../img/project_merge_requests_list_view.png | Bin 0 -> 325819 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/user/project/merge_requests/img/project_merge_requests_list_view.png diff --git a/doc/user/project/merge_requests/img/project_merge_requests_list_view.png b/doc/user/project/merge_requests/img/project_merge_requests_list_view.png new file mode 100644 index 00000000000..702ec1a2949 Binary files /dev/null and b/doc/user/project/merge_requests/img/project_merge_requests_list_view.png differ -- cgit v1.2.1 From f77798ab0ddf83e468f1525f132f974500e4ccff Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Fri, 18 Aug 2017 20:33:14 +0000 Subject: Merge request list views --- doc/user/project/merge_requests/index.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md index 9bdf2a998d3..53f71e544ad 100644 --- a/doc/user/project/merge_requests/index.md +++ b/doc/user/project/merge_requests/index.md @@ -56,6 +56,22 @@ B. Consider you're a web developer writing a webpage for your company's: 1. Once approved, your merge request is [squashed and merged](https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html), and [deployed to staging with GitLab Pages](https://about.gitlab.com/2016/08/26/ci-deployment-and-environments/) (Squash and Merge is available in GitLab Enterprise Edition Starter) 1. Your production team [cherry picks](#cherry-pick-changes) the merge commit into production + +## Merge request list views, searching, and filtering + +View all the merge requests within a project by navigating to **Project > Merge Requests**. +There are tabs to quickly filter by open, merged, and closed merge requests. + +![Project merge requests list view](img/project_merge_requests_list_view.png) + +View all the merge requests in a group (that is, all the merge requests across all projects in that +group) by navigating to **Group > Merge Requests**. This view also has the open, merged, and closed +merge request tabs. + +![Group Issues list view](img/group_merge_requests_list_view.png) + +In both these list views, [search and filter the results](). + ## Authorization for merge requests There are two main ways to have a merge request flow with GitLab: -- cgit v1.2.1 From 1939052afc8995123e67786ec92762e1a7d17fed Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Fri, 18 Aug 2017 20:39:48 +0000 Subject: Update search docs --- doc/user/search/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/user/search/index.md b/doc/user/search/index.md index 79f34fd29ba..52af864d54e 100644 --- a/doc/user/search/index.md +++ b/doc/user/search/index.md @@ -48,6 +48,10 @@ the same way as you do for projects. ![filter issues in a group](img/group_issues_filter.png) +The same process is valid for merge requests. Navigate to your project's **Merge Requests** tab. +The search and filter UI currently uses dropdowns. In a future release, the same +dynamic UI as above will be carried over here. + ## Search history You can view recent searches by clicking on the little arrow-clock icon, which is to the left of the search input. Click the search entry to run that search again. This feature is available for issues and merge requests. Searches are stored locally in your browser. -- cgit v1.2.1 From 02c13cbb4d52cc83573519cf42ffa2e468016526 Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Fri, 18 Aug 2017 20:48:01 +0000 Subject: Update search and filter links --- doc/use..r/project/merge_requests/index.md | 251 +++++++++++++++++++++++++++++ doc/user/project/merge_requests/index.md | 249 ---------------------------- 2 files changed, 251 insertions(+), 249 deletions(-) create mode 100644 doc/use..r/project/merge_requests/index.md delete mode 100644 doc/user/project/merge_requests/index.md diff --git a/doc/use..r/project/merge_requests/index.md b/doc/use..r/project/merge_requests/index.md new file mode 100644 index 00000000000..6c72f3e81b3 --- /dev/null +++ b/doc/use..r/project/merge_requests/index.md @@ -0,0 +1,251 @@ +# Merge requests + +Merge requests allow you to exchange changes you made to source code and +collaborate with other people on the same project. + +## Overview + +A Merge Request (**MR**) is the basis of GitLab as a code collaboration +and version control platform. +Is it simple as the name implies: a _request_ to _merge_ one branch into another. + +With GitLab merge requests, you can: + +- Compare the changes between two [branches](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell#_git_branching) +- [Review and discuss](../../discussions/index.md#discussions) the proposed modifications inline +- Live preview the changes when [Review Apps](../../../ci/review_apps/index.md) is configured for your project +- Build, test, and deploy your code in a per-branch basis with built-in [GitLab CI/CD](../../../ci/README.md) +- Prevent the merge request from being merged before it's ready with [WIP MRs](#work-in-progress-merge-requests) +- View the deployment process through [Pipeline Graphs](../../../ci/pipelines.md#pipeline-graphs) +- [Automatically close the issue(s)](../../project/issues/closing_issues.md#via-merge-request) that originated the implementation proposed in the merge request +- Assign it to any registered user, and change the assignee how many times you need +- Assign a [milestone](../../project/milestones/index.md) and track the development of a broader implementation +- Organize your issues and merge requests consistently throughout the project with [labels](../../project/labels.md) +- Add a time estimation and the time spent with that merge request with [Time Tracking](../../../workflow/time_tracking.html#time-tracking) +- [Resolve merge conflicts from the UI](#resolve-conflicts) + +With **[GitLab Enterprise Edition][ee]**, you can also: + +- View the deployment process across projects with [Multi-Project Pipeline Graphs](https://docs.gitlab.com/ee/ci/multi_project_pipeline_graphs.html#multi-project-pipeline-graphs) (available only in GitLab Enterprise Edition Premium) +- Request [approvals](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html) from your managers (available in GitLab Enterprise Edition Starter) +- Enable [fast-forward merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/fast_forward_merge.html) (available in GitLab Enterprise Edition Starter) +- [Squash and merge](https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html) for a cleaner commit history (available in GitLab Enterprise Edition Starter) +- Enable [semi-linear history merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/index.html#semi-linear-history-merge-requests) as another security layer to guarantee the pipeline is passing in the target branch (available in GitLab Enterprise Edition Starter) +- Analise the impact of your changes with [Code Quality reports](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality_diff.html) (available in GitLab Enterprise Edition Starter) + +## 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](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality_diff.html) (available in GitLab Enterprise Edition Starter) +1. You build and test your changes with GitLab CI/CD +1. You request the approval from your manager +1. Your manager pushes a commit with his final review, [approves the merge request](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html), and set it to [merge when pipeline succeeds](#merge-when-pipeline-succeeds) (Merge Request Approvals are available in GitLab Enterprise Edition Starter) +1. Your changes get deployed to production with [manual actions](../../../ci/yaml/README.md#manual-actions) 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: + +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](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html) from your manager (available in GitLab Enterprise Edition Starter) +1. Once approved, your merge request is [squashed and merged](https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html), and [deployed to staging with GitLab Pages](https://about.gitlab.com/2016/08/26/ci-deployment-and-environments/) (Squash and Merge is available in GitLab Enterprise Edition Starter) +1. Your production team [cherry picks](#cherry-pick-changes) the merge commit into production + + +## Merge request list views, searching, and filtering + +View all the merge requests within a project by navigating to **Project > Merge Requests**. +There are tabs to quickly filter by open, merged, and closed merge requests. + +![Project merge requests list view](img/project_merge_requests_list_view.png) + +[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-project) + +View all the merge requests in a group (that is, all the merge requests across all projects in that +group) by navigating to **Group > Merge Requests**. This view also has the open, merged, and closed +merge request tabs. + +![Group Issues list view](img/group_merge_requests_list_view.png) + +[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-group) + +## Authorization for merge requests + +There are two main ways to have a merge request flow with GitLab: + +1. Working with [protected branches][] in a single repository +1. Working with forks of an authoritative project + +[Learn more about the authorization for merge requests.](authorization_for_merge_requests.md) + +## Cherry-pick changes + +Cherry-pick any commit in the UI by simply clicking the **Cherry-pick** button +in a merged merge requests or a commit. + +[Learn more about cherry-picking changes.](cherry_pick_changes.md) + +## Merge when pipeline succeeds + +When reviewing a merge request that looks ready to merge but still has one or +more CI jobs running, you can set it to be merged automatically when CI +pipeline succeeds. This way, you don't have to wait for the pipeline to finish +and remember to merge the request manually. + +[Learn more about merging when pipeline succeeds.](merge_when_pipeline_succeeds.md) + +## Resolve discussion comments in merge requests reviews + +Keep track of the progress during a code review with resolving comments. +Resolving comments prevents you from forgetting to address feedback and lets +you hide discussions that are no longer relevant. + +[Read more about resolving discussion comments in merge requests reviews.](../../discussions/index.md) + +## Resolve conflicts + +When a merge request has conflicts, GitLab may provide the option to resolve +those conflicts in the GitLab UI. + +[Learn more about resolving merge conflicts in the UI.](resolve_conflicts.md) + +## Revert changes + +GitLab implements Git's powerful feature to revert any commit with introducing +a **Revert** button in merge requests and commit details. + +[Learn more about reverting changes in the UI](revert_changes.md) + +## Merge requests versions + +Every time you push to a branch that is tied to a merge request, a new version +of merge request diff is created. When you visit a merge request that contains +more than one pushes, you can select and compare the versions of those merge +request diffs. + +[Read more about the merge requests versions.](versions.md) + +## Work In Progress merge requests + +To prevent merge requests from accidentally being accepted before they're +completely ready, GitLab blocks the "Accept" button for merge requests that +have been marked as a **Work In Progress**. + +[Learn more about settings a merge request as "Work In Progress".](work_in_progress_merge_requests.md) + +## Ignore whitespace changes in Merge Request diff view + +If you click the **Hide whitespace changes** button, you can see the diff +without whitespace changes (if there are any). This is also working when on a +specific commit page. + +![MR diff](img/merge_request_diff.png) + +>**Tip:** +You can append `?w=1` while on the diffs page of a merge request to ignore any +whitespace changes. + +## Live preview with Review Apps + +If you configured [Review Apps](https://about.gitlab.com/features/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. + +[Read more about Review Apps.](../../../ci/review_apps/index.md) + + +## Tips + +Here are some tips that will help you be more efficient with merge requests in +the command line. + +> **Note:** +This section might move in its own document in the future. + +### Checkout merge requests locally + +A merge request contains all the history from a repository, plus the additional +commits added to the branch associated with the merge request. Here's a few +tricks to checkout a merge request locally. + +Please note that you can checkout a merge request locally even if the source +project is a fork (even a private fork) of the target project. + +#### Checkout locally by adding a git alias + +Add the following alias to your `~/.gitconfig`: + +``` +[alias] + mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' - +``` + +Now you can check out a particular merge request from any repository and any +remote. For example, to check out the merge request with ID 5 as shown in GitLab +from the `upstream` remote, do: + +``` +git mr upstream 5 +``` + +This will fetch the merge request into a local `mr-upstream-5` branch and check +it out. + +#### Checkout locally by modifying `.git/config` for a given repository + +Locate the section for your GitLab remote in the `.git/config` file. It looks +like this: + +``` +[remote "origin"] + url = https://gitlab.com/gitlab-org/gitlab-ce.git + fetch = +refs/heads/*:refs/remotes/origin/* +``` + +You can open the file with: + +``` +git config -e +``` + +Now add the following line to the above section: + +``` +fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/* +``` + +In the end, it should look like this: + +``` +[remote "origin"] + url = https://gitlab.com/gitlab-org/gitlab-ce.git + fetch = +refs/heads/*:refs/remotes/origin/* + fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/* +``` + +Now you can fetch all the merge requests: + +``` +git fetch origin + +... +From https://gitlab.com/gitlab-org/gitlab-ce.git + * [new ref] refs/merge-requests/1/head -> origin/merge-requests/1 + * [new ref] refs/merge-requests/2/head -> origin/merge-requests/2 +... +``` + +And to check out a particular merge request: + +``` +git checkout origin/merge-requests/1 +``` + +[protected branches]: ../protected_branches.md +[ee]: https://about.gitlab.com/gitlab-ee/ "GitLab Enterprise Edition" diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md deleted file mode 100644 index 53f71e544ad..00000000000 --- a/doc/user/project/merge_requests/index.md +++ /dev/null @@ -1,249 +0,0 @@ -# Merge requests - -Merge requests allow you to exchange changes you made to source code and -collaborate with other people on the same project. - -## Overview - -A Merge Request (**MR**) is the basis of GitLab as a code collaboration -and version control platform. -Is it simple as the name implies: a _request_ to _merge_ one branch into another. - -With GitLab merge requests, you can: - -- Compare the changes between two [branches](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell#_git_branching) -- [Review and discuss](../../discussions/index.md#discussions) the proposed modifications inline -- Live preview the changes when [Review Apps](../../../ci/review_apps/index.md) is configured for your project -- Build, test, and deploy your code in a per-branch basis with built-in [GitLab CI/CD](../../../ci/README.md) -- Prevent the merge request from being merged before it's ready with [WIP MRs](#work-in-progress-merge-requests) -- View the deployment process through [Pipeline Graphs](../../../ci/pipelines.md#pipeline-graphs) -- [Automatically close the issue(s)](../../project/issues/closing_issues.md#via-merge-request) that originated the implementation proposed in the merge request -- Assign it to any registered user, and change the assignee how many times you need -- Assign a [milestone](../../project/milestones/index.md) and track the development of a broader implementation -- Organize your issues and merge requests consistently throughout the project with [labels](../../project/labels.md) -- Add a time estimation and the time spent with that merge request with [Time Tracking](../../../workflow/time_tracking.html#time-tracking) -- [Resolve merge conflicts from the UI](#resolve-conflicts) - -With **[GitLab Enterprise Edition][ee]**, you can also: - -- View the deployment process across projects with [Multi-Project Pipeline Graphs](https://docs.gitlab.com/ee/ci/multi_project_pipeline_graphs.html#multi-project-pipeline-graphs) (available only in GitLab Enterprise Edition Premium) -- Request [approvals](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html) from your managers (available in GitLab Enterprise Edition Starter) -- Enable [fast-forward merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/fast_forward_merge.html) (available in GitLab Enterprise Edition Starter) -- [Squash and merge](https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html) for a cleaner commit history (available in GitLab Enterprise Edition Starter) -- Enable [semi-linear history merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/index.html#semi-linear-history-merge-requests) as another security layer to guarantee the pipeline is passing in the target branch (available in GitLab Enterprise Edition Starter) -- Analise the impact of your changes with [Code Quality reports](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality_diff.html) (available in GitLab Enterprise Edition Starter) - -## 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](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality_diff.html) (available in GitLab Enterprise Edition Starter) -1. You build and test your changes with GitLab CI/CD -1. You request the approval from your manager -1. Your manager pushes a commit with his final review, [approves the merge request](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html), and set it to [merge when pipeline succeeds](#merge-when-pipeline-succeeds) (Merge Request Approvals are available in GitLab Enterprise Edition Starter) -1. Your changes get deployed to production with [manual actions](../../../ci/yaml/README.md#manual-actions) 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: - -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](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html) from your manager (available in GitLab Enterprise Edition Starter) -1. Once approved, your merge request is [squashed and merged](https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html), and [deployed to staging with GitLab Pages](https://about.gitlab.com/2016/08/26/ci-deployment-and-environments/) (Squash and Merge is available in GitLab Enterprise Edition Starter) -1. Your production team [cherry picks](#cherry-pick-changes) the merge commit into production - - -## Merge request list views, searching, and filtering - -View all the merge requests within a project by navigating to **Project > Merge Requests**. -There are tabs to quickly filter by open, merged, and closed merge requests. - -![Project merge requests list view](img/project_merge_requests_list_view.png) - -View all the merge requests in a group (that is, all the merge requests across all projects in that -group) by navigating to **Group > Merge Requests**. This view also has the open, merged, and closed -merge request tabs. - -![Group Issues list view](img/group_merge_requests_list_view.png) - -In both these list views, [search and filter the results](). - -## Authorization for merge requests - -There are two main ways to have a merge request flow with GitLab: - -1. Working with [protected branches][] in a single repository -1. Working with forks of an authoritative project - -[Learn more about the authorization for merge requests.](authorization_for_merge_requests.md) - -## Cherry-pick changes - -Cherry-pick any commit in the UI by simply clicking the **Cherry-pick** button -in a merged merge requests or a commit. - -[Learn more about cherry-picking changes.](cherry_pick_changes.md) - -## Merge when pipeline succeeds - -When reviewing a merge request that looks ready to merge but still has one or -more CI jobs running, you can set it to be merged automatically when CI -pipeline succeeds. This way, you don't have to wait for the pipeline to finish -and remember to merge the request manually. - -[Learn more about merging when pipeline succeeds.](merge_when_pipeline_succeeds.md) - -## Resolve discussion comments in merge requests reviews - -Keep track of the progress during a code review with resolving comments. -Resolving comments prevents you from forgetting to address feedback and lets -you hide discussions that are no longer relevant. - -[Read more about resolving discussion comments in merge requests reviews.](../../discussions/index.md) - -## Resolve conflicts - -When a merge request has conflicts, GitLab may provide the option to resolve -those conflicts in the GitLab UI. - -[Learn more about resolving merge conflicts in the UI.](resolve_conflicts.md) - -## Revert changes - -GitLab implements Git's powerful feature to revert any commit with introducing -a **Revert** button in merge requests and commit details. - -[Learn more about reverting changes in the UI](revert_changes.md) - -## Merge requests versions - -Every time you push to a branch that is tied to a merge request, a new version -of merge request diff is created. When you visit a merge request that contains -more than one pushes, you can select and compare the versions of those merge -request diffs. - -[Read more about the merge requests versions.](versions.md) - -## Work In Progress merge requests - -To prevent merge requests from accidentally being accepted before they're -completely ready, GitLab blocks the "Accept" button for merge requests that -have been marked as a **Work In Progress**. - -[Learn more about settings a merge request as "Work In Progress".](work_in_progress_merge_requests.md) - -## Ignore whitespace changes in Merge Request diff view - -If you click the **Hide whitespace changes** button, you can see the diff -without whitespace changes (if there are any). This is also working when on a -specific commit page. - -![MR diff](img/merge_request_diff.png) - ->**Tip:** -You can append `?w=1` while on the diffs page of a merge request to ignore any -whitespace changes. - -## Live preview with Review Apps - -If you configured [Review Apps](https://about.gitlab.com/features/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. - -[Read more about Review Apps.](../../../ci/review_apps/index.md) - - -## Tips - -Here are some tips that will help you be more efficient with merge requests in -the command line. - -> **Note:** -This section might move in its own document in the future. - -### Checkout merge requests locally - -A merge request contains all the history from a repository, plus the additional -commits added to the branch associated with the merge request. Here's a few -tricks to checkout a merge request locally. - -Please note that you can checkout a merge request locally even if the source -project is a fork (even a private fork) of the target project. - -#### Checkout locally by adding a git alias - -Add the following alias to your `~/.gitconfig`: - -``` -[alias] - mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' - -``` - -Now you can check out a particular merge request from any repository and any -remote. For example, to check out the merge request with ID 5 as shown in GitLab -from the `upstream` remote, do: - -``` -git mr upstream 5 -``` - -This will fetch the merge request into a local `mr-upstream-5` branch and check -it out. - -#### Checkout locally by modifying `.git/config` for a given repository - -Locate the section for your GitLab remote in the `.git/config` file. It looks -like this: - -``` -[remote "origin"] - url = https://gitlab.com/gitlab-org/gitlab-ce.git - fetch = +refs/heads/*:refs/remotes/origin/* -``` - -You can open the file with: - -``` -git config -e -``` - -Now add the following line to the above section: - -``` -fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/* -``` - -In the end, it should look like this: - -``` -[remote "origin"] - url = https://gitlab.com/gitlab-org/gitlab-ce.git - fetch = +refs/heads/*:refs/remotes/origin/* - fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/* -``` - -Now you can fetch all the merge requests: - -``` -git fetch origin - -... -From https://gitlab.com/gitlab-org/gitlab-ce.git - * [new ref] refs/merge-requests/1/head -> origin/merge-requests/1 - * [new ref] refs/merge-requests/2/head -> origin/merge-requests/2 -... -``` - -And to check out a particular merge request: - -``` -git checkout origin/merge-requests/1 -``` - -[protected branches]: ../protected_branches.md -[ee]: https://about.gitlab.com/gitlab-ee/ "GitLab Enterprise Edition" -- cgit v1.2.1 From fb8dd2f418a90fea41182497b34e7c17aa0955b0 Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Fri, 18 Aug 2017 20:51:09 +0000 Subject: Search and filter results. --- doc/user/project/issues/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/user/project/issues/index.md b/doc/user/project/issues/index.md index dedd02396ab..759744881f1 100644 --- a/doc/user/project/issues/index.md +++ b/doc/user/project/issues/index.md @@ -53,13 +53,15 @@ There are tabs to quickly filter by open and closed issues. ![Project issues list view](img/project_issues_list_view.png) +[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-project). + View all the issues in a group (that is, all the issues across all projects in that group) by navigating to **Group > Issues**. This view also has the open and closed issue tabs. ![Group Issues list view](img/group_issues_list_view.png) -In both these list views, [search and filter the results](). +[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-group). ## GitLab Issues Functionalities -- cgit v1.2.1 From f281b7d7ac1bad85f0eb479a836320abcd598e5b Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Fri, 18 Aug 2017 20:54:26 +0000 Subject: Punctuation. --- doc/use..r/project/merge_requests/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/use..r/project/merge_requests/index.md b/doc/use..r/project/merge_requests/index.md index 6c72f3e81b3..b2fe8f21f8b 100644 --- a/doc/use..r/project/merge_requests/index.md +++ b/doc/use..r/project/merge_requests/index.md @@ -64,7 +64,7 @@ There are tabs to quickly filter by open, merged, and closed merge requests. ![Project merge requests list view](img/project_merge_requests_list_view.png) -[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-project) +[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-project). View all the merge requests in a group (that is, all the merge requests across all projects in that group) by navigating to **Group > Merge Requests**. This view also has the open, merged, and closed @@ -72,7 +72,7 @@ merge request tabs. ![Group Issues list view](img/group_merge_requests_list_view.png) -[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-group) +[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-group). ## Authorization for merge requests -- cgit v1.2.1 From ed32b920531c5ca33fadb9bcfa8cd68df88baeaf Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Fri, 18 Aug 2017 21:31:58 +0000 Subject: Delete index.md --- doc/use..r/project/merge_requests/index.md | 251 ----------------------------- 1 file changed, 251 deletions(-) delete mode 100644 doc/use..r/project/merge_requests/index.md diff --git a/doc/use..r/project/merge_requests/index.md b/doc/use..r/project/merge_requests/index.md deleted file mode 100644 index b2fe8f21f8b..00000000000 --- a/doc/use..r/project/merge_requests/index.md +++ /dev/null @@ -1,251 +0,0 @@ -# Merge requests - -Merge requests allow you to exchange changes you made to source code and -collaborate with other people on the same project. - -## Overview - -A Merge Request (**MR**) is the basis of GitLab as a code collaboration -and version control platform. -Is it simple as the name implies: a _request_ to _merge_ one branch into another. - -With GitLab merge requests, you can: - -- Compare the changes between two [branches](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell#_git_branching) -- [Review and discuss](../../discussions/index.md#discussions) the proposed modifications inline -- Live preview the changes when [Review Apps](../../../ci/review_apps/index.md) is configured for your project -- Build, test, and deploy your code in a per-branch basis with built-in [GitLab CI/CD](../../../ci/README.md) -- Prevent the merge request from being merged before it's ready with [WIP MRs](#work-in-progress-merge-requests) -- View the deployment process through [Pipeline Graphs](../../../ci/pipelines.md#pipeline-graphs) -- [Automatically close the issue(s)](../../project/issues/closing_issues.md#via-merge-request) that originated the implementation proposed in the merge request -- Assign it to any registered user, and change the assignee how many times you need -- Assign a [milestone](../../project/milestones/index.md) and track the development of a broader implementation -- Organize your issues and merge requests consistently throughout the project with [labels](../../project/labels.md) -- Add a time estimation and the time spent with that merge request with [Time Tracking](../../../workflow/time_tracking.html#time-tracking) -- [Resolve merge conflicts from the UI](#resolve-conflicts) - -With **[GitLab Enterprise Edition][ee]**, you can also: - -- View the deployment process across projects with [Multi-Project Pipeline Graphs](https://docs.gitlab.com/ee/ci/multi_project_pipeline_graphs.html#multi-project-pipeline-graphs) (available only in GitLab Enterprise Edition Premium) -- Request [approvals](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html) from your managers (available in GitLab Enterprise Edition Starter) -- Enable [fast-forward merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/fast_forward_merge.html) (available in GitLab Enterprise Edition Starter) -- [Squash and merge](https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html) for a cleaner commit history (available in GitLab Enterprise Edition Starter) -- Enable [semi-linear history merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/index.html#semi-linear-history-merge-requests) as another security layer to guarantee the pipeline is passing in the target branch (available in GitLab Enterprise Edition Starter) -- Analise the impact of your changes with [Code Quality reports](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality_diff.html) (available in GitLab Enterprise Edition Starter) - -## 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](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality_diff.html) (available in GitLab Enterprise Edition Starter) -1. You build and test your changes with GitLab CI/CD -1. You request the approval from your manager -1. Your manager pushes a commit with his final review, [approves the merge request](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html), and set it to [merge when pipeline succeeds](#merge-when-pipeline-succeeds) (Merge Request Approvals are available in GitLab Enterprise Edition Starter) -1. Your changes get deployed to production with [manual actions](../../../ci/yaml/README.md#manual-actions) 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: - -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](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html) from your manager (available in GitLab Enterprise Edition Starter) -1. Once approved, your merge request is [squashed and merged](https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html), and [deployed to staging with GitLab Pages](https://about.gitlab.com/2016/08/26/ci-deployment-and-environments/) (Squash and Merge is available in GitLab Enterprise Edition Starter) -1. Your production team [cherry picks](#cherry-pick-changes) the merge commit into production - - -## Merge request list views, searching, and filtering - -View all the merge requests within a project by navigating to **Project > Merge Requests**. -There are tabs to quickly filter by open, merged, and closed merge requests. - -![Project merge requests list view](img/project_merge_requests_list_view.png) - -[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-project). - -View all the merge requests in a group (that is, all the merge requests across all projects in that -group) by navigating to **Group > Merge Requests**. This view also has the open, merged, and closed -merge request tabs. - -![Group Issues list view](img/group_merge_requests_list_view.png) - -[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-group). - -## Authorization for merge requests - -There are two main ways to have a merge request flow with GitLab: - -1. Working with [protected branches][] in a single repository -1. Working with forks of an authoritative project - -[Learn more about the authorization for merge requests.](authorization_for_merge_requests.md) - -## Cherry-pick changes - -Cherry-pick any commit in the UI by simply clicking the **Cherry-pick** button -in a merged merge requests or a commit. - -[Learn more about cherry-picking changes.](cherry_pick_changes.md) - -## Merge when pipeline succeeds - -When reviewing a merge request that looks ready to merge but still has one or -more CI jobs running, you can set it to be merged automatically when CI -pipeline succeeds. This way, you don't have to wait for the pipeline to finish -and remember to merge the request manually. - -[Learn more about merging when pipeline succeeds.](merge_when_pipeline_succeeds.md) - -## Resolve discussion comments in merge requests reviews - -Keep track of the progress during a code review with resolving comments. -Resolving comments prevents you from forgetting to address feedback and lets -you hide discussions that are no longer relevant. - -[Read more about resolving discussion comments in merge requests reviews.](../../discussions/index.md) - -## Resolve conflicts - -When a merge request has conflicts, GitLab may provide the option to resolve -those conflicts in the GitLab UI. - -[Learn more about resolving merge conflicts in the UI.](resolve_conflicts.md) - -## Revert changes - -GitLab implements Git's powerful feature to revert any commit with introducing -a **Revert** button in merge requests and commit details. - -[Learn more about reverting changes in the UI](revert_changes.md) - -## Merge requests versions - -Every time you push to a branch that is tied to a merge request, a new version -of merge request diff is created. When you visit a merge request that contains -more than one pushes, you can select and compare the versions of those merge -request diffs. - -[Read more about the merge requests versions.](versions.md) - -## Work In Progress merge requests - -To prevent merge requests from accidentally being accepted before they're -completely ready, GitLab blocks the "Accept" button for merge requests that -have been marked as a **Work In Progress**. - -[Learn more about settings a merge request as "Work In Progress".](work_in_progress_merge_requests.md) - -## Ignore whitespace changes in Merge Request diff view - -If you click the **Hide whitespace changes** button, you can see the diff -without whitespace changes (if there are any). This is also working when on a -specific commit page. - -![MR diff](img/merge_request_diff.png) - ->**Tip:** -You can append `?w=1` while on the diffs page of a merge request to ignore any -whitespace changes. - -## Live preview with Review Apps - -If you configured [Review Apps](https://about.gitlab.com/features/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. - -[Read more about Review Apps.](../../../ci/review_apps/index.md) - - -## Tips - -Here are some tips that will help you be more efficient with merge requests in -the command line. - -> **Note:** -This section might move in its own document in the future. - -### Checkout merge requests locally - -A merge request contains all the history from a repository, plus the additional -commits added to the branch associated with the merge request. Here's a few -tricks to checkout a merge request locally. - -Please note that you can checkout a merge request locally even if the source -project is a fork (even a private fork) of the target project. - -#### Checkout locally by adding a git alias - -Add the following alias to your `~/.gitconfig`: - -``` -[alias] - mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' - -``` - -Now you can check out a particular merge request from any repository and any -remote. For example, to check out the merge request with ID 5 as shown in GitLab -from the `upstream` remote, do: - -``` -git mr upstream 5 -``` - -This will fetch the merge request into a local `mr-upstream-5` branch and check -it out. - -#### Checkout locally by modifying `.git/config` for a given repository - -Locate the section for your GitLab remote in the `.git/config` file. It looks -like this: - -``` -[remote "origin"] - url = https://gitlab.com/gitlab-org/gitlab-ce.git - fetch = +refs/heads/*:refs/remotes/origin/* -``` - -You can open the file with: - -``` -git config -e -``` - -Now add the following line to the above section: - -``` -fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/* -``` - -In the end, it should look like this: - -``` -[remote "origin"] - url = https://gitlab.com/gitlab-org/gitlab-ce.git - fetch = +refs/heads/*:refs/remotes/origin/* - fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/* -``` - -Now you can fetch all the merge requests: - -``` -git fetch origin - -... -From https://gitlab.com/gitlab-org/gitlab-ce.git - * [new ref] refs/merge-requests/1/head -> origin/merge-requests/1 - * [new ref] refs/merge-requests/2/head -> origin/merge-requests/2 -... -``` - -And to check out a particular merge request: - -``` -git checkout origin/merge-requests/1 -``` - -[protected branches]: ../protected_branches.md -[ee]: https://about.gitlab.com/gitlab-ee/ "GitLab Enterprise Edition" -- cgit v1.2.1 From 411f341c4a25c1dd1defd73d562124ef1e8753b9 Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Fri, 18 Aug 2017 21:34:02 +0000 Subject: Merge requests search and filtering --- doc/user/project/merge_requests/index.md | 251 +++++++++++++++++++++++++++++++ 1 file changed, 251 insertions(+) create mode 100644 doc/user/project/merge_requests/index.md diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md new file mode 100644 index 00000000000..cd52471922f --- /dev/null +++ b/doc/user/project/merge_requests/index.md @@ -0,0 +1,251 @@ +# Merge requests + +Merge requests allow you to exchange changes you made to source code and +collaborate with other people on the same project. + +## Overview + +A Merge Request (**MR**) is the basis of GitLab as a code collaboration +and version control platform. +Is it simple as the name implies: a _request_ to _merge_ one branch into another. + +With GitLab merge requests, you can: + +- Compare the changes between two [branches](https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell#_git_branching) +- [Review and discuss](../../discussions/index.md#discussions) the proposed modifications inline +- Live preview the changes when [Review Apps](../../../ci/review_apps/index.md) is configured for your project +- Build, test, and deploy your code in a per-branch basis with built-in [GitLab CI/CD](../../../ci/README.md) +- Prevent the merge request from being merged before it's ready with [WIP MRs](#work-in-progress-merge-requests) +- View the deployment process through [Pipeline Graphs](../../../ci/pipelines.md#pipeline-graphs) +- [Automatically close the issue(s)](../../project/issues/closing_issues.md#via-merge-request) that originated the implementation proposed in the merge request +- Assign it to any registered user, and change the assignee how many times you need +- Assign a [milestone](../../project/milestones/index.md) and track the development of a broader implementation +- Organize your issues and merge requests consistently throughout the project with [labels](../../project/labels.md) +- Add a time estimation and the time spent with that merge request with [Time Tracking](../../../workflow/time_tracking.html#time-tracking) +- [Resolve merge conflicts from the UI](#resolve-conflicts) + +With **[GitLab Enterprise Edition][ee]**, you can also: + +- View the deployment process across projects with [Multi-Project Pipeline Graphs](https://docs.gitlab.com/ee/ci/multi_project_pipeline_graphs.html#multi-project-pipeline-graphs) (available only in GitLab Enterprise Edition Premium) +- Request [approvals](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html) from your managers (available in GitLab Enterprise Edition Starter) +- Enable [fast-forward merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/fast_forward_merge.html) (available in GitLab Enterprise Edition Starter) +- [Squash and merge](https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html) for a cleaner commit history (available in GitLab Enterprise Edition Starter) +- Enable [semi-linear history merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/index.html#semi-linear-history-merge-requests) as another security layer to guarantee the pipeline is passing in the target branch (available in GitLab Enterprise Edition Starter) +- Analise the impact of your changes with [Code Quality reports](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality_diff.html) (available in GitLab Enterprise Edition Starter) + +## 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](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality_diff.html) (available in GitLab Enterprise Edition Starter) +1. You build and test your changes with GitLab CI/CD +1. You request the approval from your manager +1. Your manager pushes a commit with his final review, [approves the merge request](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html), and set it to [merge when pipeline succeeds](#merge-when-pipeline-succeeds) (Merge Request Approvals are available in GitLab Enterprise Edition Starter) +1. Your changes get deployed to production with [manual actions](../../../ci/yaml/README.md#manual-actions) 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: + +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](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html) from your manager (available in GitLab Enterprise Edition Starter) +1. Once approved, your merge request is [squashed and merged](https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html), and [deployed to staging with GitLab Pages](https://about.gitlab.com/2016/08/26/ci-deployment-and-environments/) (Squash and Merge is available in GitLab Enterprise Edition Starter) +1. Your production team [cherry picks](#cherry-pick-changes) the merge commit into production + + +## Merge request list views, searching, and filtering + +View all the merge requests within a project by navigating to **Project > Merge Requests**. +There are tabs to quickly filter by open, merged, and closed merge requests. + +![Project merge requests list view](img/project_merge_requests_list_view.png) + +[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-project). + +View all the merge requests in a group (that is, all the merge requests across all projects in that +group) by navigating to **Group > Merge Requests**. This view also has the open, merged, and closed +merge request tabs. + +![Group Issues list view](img/group_merge_requests_list_view.png) + +[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-group). + +## Authorization for merge requests + +There are two main ways to have a merge request flow with GitLab: + +1. Working with [protected branches][] in a single repository +1. Working with forks of an authoritative project + +[Learn more about the authorization for merge requests.](authorization_for_merge_requests.md) + +## Cherry-pick changes + +Cherry-pick any commit in the UI by simply clicking the **Cherry-pick** button +in a merged merge requests or a commit. + +[Learn more about cherry-picking changes.](cherry_pick_changes.md) + +## Merge when pipeline succeeds + +When reviewing a merge request that looks ready to merge but still has one or +more CI jobs running, you can set it to be merged automatically when CI +pipeline succeeds. This way, you don't have to wait for the pipeline to finish +and remember to merge the request manually. + +[Learn more about merging when pipeline succeeds.](merge_when_pipeline_succeeds.md) + +## Resolve discussion comments in merge requests reviews + +Keep track of the progress during a code review with resolving comments. +Resolving comments prevents you from forgetting to address feedback and lets +you hide discussions that are no longer relevant. + +[Read more about resolving discussion comments in merge requests reviews.](../../discussions/index.md) + +## Resolve conflicts + +When a merge request has conflicts, GitLab may provide the option to resolve +those conflicts in the GitLab UI. + +[Learn more about resolving merge conflicts in the UI.](resolve_conflicts.md) + +## Revert changes + +GitLab implements Git's powerful feature to revert any commit with introducing +a **Revert** button in merge requests and commit details. + +[Learn more about reverting changes in the UI](revert_changes.md) + +## Merge requests versions + +Every time you push to a branch that is tied to a merge request, a new version +of merge request diff is created. When you visit a merge request that contains +more than one pushes, you can select and compare the versions of those merge +request diffs. + +[Read more about the merge requests versions.](versions.md) + +## Work In Progress merge requests + +To prevent merge requests from accidentally being accepted before they're +completely ready, GitLab blocks the "Accept" button for merge requests that +have been marked as a **Work In Progress**. + +[Learn more about settings a merge request as "Work In Progress".](work_in_progress_merge_requests.md) + +## Ignore whitespace changes in Merge Request diff view + +If you click the **Hide whitespace changes** button, you can see the diff +without whitespace changes (if there are any). This is also working when on a +specific commit page. + +![MR diff](img/merge_request_diff.png) + +>**Tip:** +You can append `?w=1` while on the diffs page of a merge request to ignore any +whitespace changes. + +## Live preview with Review Apps + +If you configured [Review Apps](https://about.gitlab.com/features/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. + +[Read more about Review Apps.](../../../ci/review_apps/index.md) + + +## Tips + +Here are some tips that will help you be more efficient with merge requests in +the command line. + +> **Note:** +This section might move in its own document in the future. + +### Checkout merge requests locally + +A merge request contains all the history from a repository, plus the additional +commits added to the branch associated with the merge request. Here's a few +tricks to checkout a merge request locally. + +Please note that you can checkout a merge request locally even if the source +project is a fork (even a private fork) of the target project. + +#### Checkout locally by adding a git alias + +Add the following alias to your `~/.gitconfig`: + +``` +[alias] + mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' - +``` + +Now you can check out a particular merge request from any repository and any +remote. For example, to check out the merge request with ID 5 as shown in GitLab +from the `upstream` remote, do: + +``` +git mr upstream 5 +``` + +This will fetch the merge request into a local `mr-upstream-5` branch and check +it out. + +#### Checkout locally by modifying `.git/config` for a given repository + +Locate the section for your GitLab remote in the `.git/config` file. It looks +like this: + +``` +[remote "origin"] + url = https://gitlab.com/gitlab-org/gitlab-ce.git + fetch = +refs/heads/*:refs/remotes/origin/* +``` + +You can open the file with: + +``` +git config -e +``` + +Now add the following line to the above section: + +``` +fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/* +``` + +In the end, it should look like this: + +``` +[remote "origin"] + url = https://gitlab.com/gitlab-org/gitlab-ce.git + fetch = +refs/heads/*:refs/remotes/origin/* + fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/* +``` + +Now you can fetch all the merge requests: + +``` +git fetch origin + +... +From https://gitlab.com/gitlab-org/gitlab-ce.git + * [new ref] refs/merge-requests/1/head -> origin/merge-requests/1 + * [new ref] refs/merge-requests/2/head -> origin/merge-requests/2 +... +``` + +And to check out a particular merge request: + +``` +git checkout origin/merge-requests/1 +``` + +[protected branches]: ../protected_branches.md +[ee]: https://about.gitlab.com/gitlab-ee/ "GitLab Enterprise Edition" \ No newline at end of file -- cgit v1.2.1 From f83392e17cc752422658326212735b73d18742e5 Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Mon, 21 Aug 2017 14:08:43 +0000 Subject: Issue tracker --- doc/user/project/issues/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/project/issues/index.md b/doc/user/project/issues/index.md index 759744881f1..05d2b315c66 100644 --- a/doc/user/project/issues/index.md +++ b/doc/user/project/issues/index.md @@ -1,6 +1,6 @@ # Issues -GitLab issues is an advanced and complete tool +The GitLab Issue Tracker is an advanced and complete tool for tracking the evolution of a new idea or the process of solving a problem. -- cgit v1.2.1 From 9b15d8e8eb6627b7e12b646c9382668d8d78e425 Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Mon, 21 Aug 2017 14:19:48 +0000 Subject: Cross link to groups docs --- doc/user/group/index.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/user/group/index.md b/doc/user/group/index.md index 9e168e830e5..2ac766e7714 100644 --- a/doc/user/group/index.md +++ b/doc/user/group/index.md @@ -55,6 +55,13 @@ By doing so: - John mentions everyone from his team with `@john-team` - John mentions only his marketing team with `@john-team/marketing` +## Group-level views of issues and merge requests + +Issues and merge requests are part of projects. GitLab allows you to view +all issues and merge requests together, within all the projects in particular group, +in dedicated group-level views. These are the [group-level issue list view](../project/issues/index.md#issue-list-views-searching-and-filtering) +and the [group-level merge request list view](../project/merge_requests/index.md#merge-request-list-views-searching-and-filtering). + ## Create a new group > **Notes:** -- cgit v1.2.1 From 71b89a87442f7a03387376fff60df8ba2233260b Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Mon, 21 Aug 2017 14:25:07 +0000 Subject: Wording --- doc/user/group/index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/user/group/index.md b/doc/user/group/index.md index 2ac766e7714..a89acd907b7 100644 --- a/doc/user/group/index.md +++ b/doc/user/group/index.md @@ -55,12 +55,12 @@ By doing so: - John mentions everyone from his team with `@john-team` - John mentions only his marketing team with `@john-team/marketing` -## Group-level views of issues and merge requests +## Group-level list views of issues and merge requests -Issues and merge requests are part of projects. GitLab allows you to view -all issues and merge requests together, within all the projects in particular group, -in dedicated group-level views. These are the [group-level issue list view](../project/issues/index.md#issue-list-views-searching-and-filtering) -and the [group-level merge request list view](../project/merge_requests/index.md#merge-request-list-views-searching-and-filtering). +Issues and merge requests are part of projects. For a given group, view all the +issues across all the projects in that group, together in a single list view. This +is the [group-level issue list view](../project/issues/index.md#issue-list-views-searching-and-filtering). +Similarly, there is a [group-level merge request list view](../project/merge_requests/index.md#merge-request-list-views-searching-and-filtering). ## Create a new group -- cgit v1.2.1 From 905caab81a95d89f8426b8bbe530d843dd718354 Mon Sep 17 00:00:00 2001 From: Marcia Ramos Date: Mon, 21 Aug 2017 15:34:52 -0300 Subject: indexes user/search/ from /user/index --- doc/user/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/user/index.md b/doc/user/index.md index d664fd62754..e9ec603f2f1 100644 --- a/doc/user/index.md +++ b/doc/user/index.md @@ -126,6 +126,10 @@ are a tool for working faster and more effectively with your team, by listing all user or group mentions, as well as issues and merge requests you're assigned to. +## Search + +[Search and filter](search/index.md) through groups, projects, issues, merge requests, files, code, and more. + ## Snippets [Snippets](snippets.md) are code blocks that you want to store in GitLab, from which -- cgit v1.2.1 From 2eb07aecc93973983c4fc1ce1820b6155e3175ce Mon Sep 17 00:00:00 2001 From: Marcia Ramos Date: Mon, 21 Aug 2017 16:04:52 -0300 Subject: copyedit --- doc/user/group/index.md | 7 +++---- doc/user/project/issues/index.md | 21 ++++++++++++++------- doc/user/project/merge_requests/index.md | 14 ++++++-------- doc/user/search/index.md | 4 ++-- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/doc/user/group/index.md b/doc/user/group/index.md index a89acd907b7..fbc05261a32 100644 --- a/doc/user/group/index.md +++ b/doc/user/group/index.md @@ -55,12 +55,11 @@ By doing so: - John mentions everyone from his team with `@john-team` - John mentions only his marketing team with `@john-team/marketing` -## Group-level list views of issues and merge requests +## Issues and merge requests within a group Issues and merge requests are part of projects. For a given group, view all the -issues across all the projects in that group, together in a single list view. This -is the [group-level issue list view](../project/issues/index.md#issue-list-views-searching-and-filtering). -Similarly, there is a [group-level merge request list view](../project/merge_requests/index.md#merge-request-list-views-searching-and-filtering). +[issues](../project/issues/index.md#issues-per-group) and [merge requests](../project/merge_requests/index.md#merge-requests-per-group) across all the projects in that group, +together in a single list view. ## Create a new group diff --git a/doc/user/project/issues/index.md b/doc/user/project/issues/index.md index 05d2b315c66..67f0230b36d 100644 --- a/doc/user/project/issues/index.md +++ b/doc/user/project/issues/index.md @@ -7,7 +7,7 @@ of solving a problem. It allows you, your team, and your collaborators to share and discuss proposals before and while implementing them. -GitLab issues is available in all +GitLab Issues and the GitLab Issue Tracker are available in all [GitLab Products](https://about.gitlab.com/products/) as part of the [GitLab Workflow](https://about.gitlab.com/2016/10/25/gitlab-workflow-an-overview/). @@ -46,14 +46,23 @@ Create [issue templates](#issue-templates) to make collaboration consistent and containing all information you need. For example, you can create a template for feature proposals and another one for bug reports. -## Issue list views, searching, and filtering +## Issue Tracker -View all the issues within a project by navigating to **Project > Issues**. -There are tabs to quickly filter by open and closed issues. +The Issue Tracker is the collection of opened and closed issues created in a project. +It is available for all projects, from the moment the project is created. + +Find the issue tracker by navigating to your **Project's homepage** > **Issues**. + +### Issues per project + +When you access your project's issues, GitLab will present them in a list, +and you can use the tabs available to quickly filter by open and closed issues. ![Project issues list view](img/project_issues_list_view.png) -[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-project). +You can also [search and filter](../../search/index.md#issues-and-merge-requests-per-project) the results more deeply with GitLab's search capacities. + +### Issues per group View all the issues in a group (that is, all the issues across all projects in that group) by navigating to **Group > Issues**. This view also has the open and closed @@ -61,8 +70,6 @@ issue tabs. ![Group Issues list view](img/group_issues_list_view.png) -[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-group). - ## GitLab Issues Functionalities The image bellow illustrates how an issue looks like: diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md index cd52471922f..285c40729fe 100644 --- a/doc/user/project/merge_requests/index.md +++ b/doc/user/project/merge_requests/index.md @@ -56,24 +56,23 @@ B. Consider you're a web developer writing a webpage for your company's: 1. Once approved, your merge request is [squashed and merged](https://docs.gitlab.com/ee/user/project/merge_requests/squash_and_merge.html), and [deployed to staging with GitLab Pages](https://about.gitlab.com/2016/08/26/ci-deployment-and-environments/) (Squash and Merge is available in GitLab Enterprise Edition Starter) 1. Your production team [cherry picks](#cherry-pick-changes) the merge commit into production +## Merge requests per project -## Merge request list views, searching, and filtering +View all the merge requests within a project by navigating to **Project > Merge Requests**. -View all the merge requests within a project by navigating to **Project > Merge Requests**. -There are tabs to quickly filter by open, merged, and closed 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). ![Project merge requests list view](img/project_merge_requests_list_view.png) -[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-project). +## Merge requests per group View all the merge requests in a group (that is, all the merge requests across all projects in that group) by navigating to **Group > Merge Requests**. This view also has the open, merged, and closed -merge request tabs. +merge request tabs, from which you can [search and filter the results](../../search/index.md#issues-and-merge-requests-per-group). ![Group Issues list view](img/group_merge_requests_list_view.png) -[Search and filter the results](../../search/index.md#issues-and-merge-requests-per-group). - ## Authorization for merge requests There are two main ways to have a merge request flow with GitLab: @@ -159,7 +158,6 @@ all your changes will be available to preview by anyone with the Review Apps lin [Read more about Review Apps.](../../../ci/review_apps/index.md) - ## Tips Here are some tips that will help you be more efficient with merge requests in diff --git a/doc/user/search/index.md b/doc/user/search/index.md index 52af864d54e..f5c7ce49e8e 100644 --- a/doc/user/search/index.md +++ b/doc/user/search/index.md @@ -27,7 +27,7 @@ on the search field on the top-right of your screen: ![shortcut to your issues and mrs](img/issues_mrs_shortcut.png) -## Issues and merge requests per project +### Issues and merge requests per project If you want to search for issues present in a specific project, navigate to a project's **Issues** tab, and click on the field **Search or filter results...**. It will @@ -40,7 +40,7 @@ The same process is valid for merge requests. Navigate to your project's **Merge and click **Search or filter results...**. Merge requests can be filtered by author, assignee, milestone, and label. -## Issues and merge requests per group +### Issues and merge requests per group Similar to **Issues and merge requests per project**, you can also search for issues within a group. Navigate to a group's **Issues** tab and query search results in -- cgit v1.2.1 From 4b142701cc08d21d80dadca27a15645573a7316a Mon Sep 17 00:00:00 2001 From: Marcia Ramos Date: Mon, 21 Aug 2017 16:05:11 -0300 Subject: indexes external issue tracker --- doc/user/project/issues/index.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/user/project/issues/index.md b/doc/user/project/issues/index.md index 67f0230b36d..20901e01f6e 100644 --- a/doc/user/project/issues/index.md +++ b/doc/user/project/issues/index.md @@ -136,6 +136,12 @@ to find out more about this feature. With [GitLab Enterprise Edition Starter](https://about.gitlab.com/gitlab-ee/), you can also create various boards per project with [Multiple Issue Boards](https://docs.gitlab.com/ee/user/project/issue_board.html#multiple-issue-boards). +### External Issue Tracker + +Alternatively to GitLab's built-in Issue Tracker, you can also use an [external +tracker](../../../integration/external-issue-tracker.md) such as Jira, Redmine, +or Bugzilla. + ### Issue's API Read through the [API documentation](../../../api/issues.md). -- cgit v1.2.1