summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-31 09:06:29 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-31 09:06:29 +0000
commit6026bddcd51eca573c530240c421392045172b89 (patch)
tree30cb1134ac00a336e6cfaa81bbafe6cd1360f58f
parentb7c776f95d5f41ac00986073563ad0c1de4bad44 (diff)
downloadgitlab-ce-6026bddcd51eca573c530240c421392045172b89.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/assets/javascripts/jobs/store/utils.js2
-rw-r--r--app/views/help/_shortcuts.html.haml2
-rw-r--r--changelogs/unreleased/stein_ma-gitlab-patch-32.yml5
-rw-r--r--doc/README.md14
-rw-r--r--doc/administration/incoming_email.md4
-rw-r--r--doc/administration/index.md2
-rw-r--r--doc/ci/README.md2
-rw-r--r--doc/ci/introduction/index.md2
-rw-r--r--doc/development/code_review.md4
-rw-r--r--doc/development/testing_guide/end_to_end/best_practices.md20
-rw-r--r--doc/user/admin_area/diff_limits.md2
-rw-r--r--doc/user/group/index.md2
-rw-r--r--doc/user/index.md8
-rw-r--r--doc/user/project/merge_requests/creating_merge_requests.md156
-rw-r--r--doc/user/project/merge_requests/index.md695
-rw-r--r--doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md251
-rw-r--r--doc/user/project/merge_requests/versions.md11
-rw-r--r--doc/user/project/settings/index.md2
-rw-r--r--locale/ar_SA/gitlab.po2
-rw-r--r--locale/bg/gitlab.po2
-rw-r--r--locale/bn_BD/gitlab.po2
-rw-r--r--locale/bn_IN/gitlab.po2
-rw-r--r--locale/ca_ES/gitlab.po2
-rw-r--r--locale/cs_CZ/gitlab.po2
-rw-r--r--locale/cy_GB/gitlab.po2
-rw-r--r--locale/da_DK/gitlab.po2
-rw-r--r--locale/de/gitlab.po2
-rw-r--r--locale/el_GR/gitlab.po2
-rw-r--r--locale/eo/gitlab.po2
-rw-r--r--locale/es/gitlab.po2
-rw-r--r--locale/et_EE/gitlab.po2
-rw-r--r--locale/fa_IR/gitlab.po2
-rw-r--r--locale/fil_PH/gitlab.po2
-rw-r--r--locale/fr/gitlab.po2
-rw-r--r--locale/gitlab.pot2
-rw-r--r--locale/gl_ES/gitlab.po2
-rw-r--r--locale/he_IL/gitlab.po2
-rw-r--r--locale/hi_IN/gitlab.po2
-rw-r--r--locale/hr_HR/gitlab.po2
-rw-r--r--locale/hu_HU/gitlab.po2
-rw-r--r--locale/id_ID/gitlab.po2
-rw-r--r--locale/it/gitlab.po2
-rw-r--r--locale/ja/gitlab.po2
-rw-r--r--locale/ka_GE/gitlab.po2
-rw-r--r--locale/ko/gitlab.po2
-rw-r--r--locale/mn_MN/gitlab.po2
-rw-r--r--locale/nb_NO/gitlab.po2
-rw-r--r--locale/nl_NL/gitlab.po2
-rw-r--r--locale/pa_IN/gitlab.po2
-rw-r--r--locale/pl_PL/gitlab.po2
-rw-r--r--locale/pt_BR/gitlab.po2
-rw-r--r--locale/pt_PT/gitlab.po2
-rw-r--r--locale/ro_RO/gitlab.po2
-rw-r--r--locale/ru/gitlab.po2
-rw-r--r--locale/sk_SK/gitlab.po2
-rw-r--r--locale/sq_AL/gitlab.po2
-rw-r--r--locale/sr_CS/gitlab.po2
-rw-r--r--locale/sr_SP/gitlab.po2
-rw-r--r--locale/sv_SE/gitlab.po2
-rw-r--r--locale/sw_KE/gitlab.po2
-rw-r--r--locale/tr_TR/gitlab.po2
-rw-r--r--locale/uk/gitlab.po2
-rw-r--r--locale/vi_VN/gitlab.po2
-rw-r--r--locale/zh_CN/gitlab.po2
-rw-r--r--locale/zh_HK/gitlab.po2
-rw-r--r--locale/zh_TW/gitlab.po2
-rw-r--r--qa/qa/runtime/browser.rb6
-rw-r--r--qa/spec/spec_helper.rb18
-rw-r--r--spec/frontend/boards/components/issue_time_estimate_spec.js81
-rw-r--r--spec/frontend/boards/issue_card_spec.js307
-rw-r--r--spec/frontend/jobs/components/log/log_spec.js4
-rw-r--r--spec/frontend/jobs/store/utils_spec.js20
-rw-r--r--spec/javascripts/boards/components/issue_time_estimate_spec.js70
-rw-r--r--spec/javascripts/boards/issue_card_spec.js294
74 files changed, 1048 insertions, 1032 deletions
diff --git a/app/assets/javascripts/jobs/store/utils.js b/app/assets/javascripts/jobs/store/utils.js
index 58e49f54d96..179d0bc4e0f 100644
--- a/app/assets/javascripts/jobs/store/utils.js
+++ b/app/assets/javascripts/jobs/store/utils.js
@@ -17,7 +17,7 @@ export const parseLine = (line = {}, lineNumber) => ({
* @param Number lineNumber
*/
export const parseHeaderLine = (line = {}, lineNumber) => ({
- isClosed: true,
+ isClosed: false,
isHeader: true,
line: parseLine(line, lineNumber),
lines: [],
diff --git a/app/views/help/_shortcuts.html.haml b/app/views/help/_shortcuts.html.haml
index f1ba804f920..5f8f2333e40 100644
--- a/app/views/help/_shortcuts.html.haml
+++ b/app/views/help/_shortcuts.html.haml
@@ -218,7 +218,7 @@
%tr
%td.shortcut
%kbd esc
- %td= _('Go back (while searching for files')
+ %td= _('Go back (while searching for files)')
%tr
%td.shortcut
%kbd y
diff --git a/changelogs/unreleased/stein_ma-gitlab-patch-32.yml b/changelogs/unreleased/stein_ma-gitlab-patch-32.yml
new file mode 100644
index 00000000000..3e747408e15
--- /dev/null
+++ b/changelogs/unreleased/stein_ma-gitlab-patch-32.yml
@@ -0,0 +1,5 @@
+---
+title: Fixed a typo in the "Keyboard Shortcuts" pop-up
+merge_request: 19217
+author: Manuel Stein
+type: fixed
diff --git a/doc/README.md b/doc/README.md
index e39b0605ff5..098a998a093 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -188,13 +188,13 @@ The following documentation relates to the DevOps **Create** stage:
#### Merge Requests
-| Create Topics - Merge Requests | Description |
-|:------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------|
-| [Checking out merge requests locally](user/project/merge_requests/index.md#checkout-merge-requests-locally) | Tips for working with merge requests locally. |
-| [Cherry-picking](user/project/merge_requests/cherry_pick_changes.md) | Use GitLab for cherry-picking changes. |
-| [Merge request thread resolution](user/discussions/index.md#moving-a-single-thread-to-a-new-issue) | Resolve threads, move threads in a merge request to an issue, and only allow merge requests to be merged if all threads are resolved. |
-| [Merge requests](user/project/merge_requests/index.md) | Merge request management. |
-| [Work In Progress "WIP" merge requests](user/project/merge_requests/work_in_progress_merge_requests.md) | Prevent merges of work-in-progress merge requests. |
+| Create Topics - Merge Requests | Description |
+|:--------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------|
+| [Checking out merge requests locally](user/project/merge_requests/reviewing_and_managing_merge_requests.md#checkout-merge-requests-locally) | Tips for working with merge requests locally. |
+| [Cherry-picking](user/project/merge_requests/cherry_pick_changes.md) | Use GitLab for cherry-picking changes. |
+| [Merge request thread resolution](user/discussions/index.md#moving-a-single-thread-to-a-new-issue) | Resolve threads, move threads in a merge request to an issue, and only allow merge requests to be merged if all threads are resolved. |
+| [Merge requests](user/project/merge_requests/index.md) | Merge request management. |
+| [Work In Progress "WIP" merge requests](user/project/merge_requests/work_in_progress_merge_requests.md) | Prevent merges of work-in-progress merge requests. |
<div align="right">
<a type="button" class="btn btn-default" href="#overview">
diff --git a/doc/administration/incoming_email.md b/doc/administration/incoming_email.md
index 88cf702cf0e..a0360f1d252 100644
--- a/doc/administration/incoming_email.md
+++ b/doc/administration/incoming_email.md
@@ -7,7 +7,7 @@ GitLab has several features based on receiving incoming emails:
- [New issue by email](../user/project/issues/managing_issues.md#new-issue-via-email):
allow GitLab users to create a new issue by sending an email to a
user-specific email address.
-- [New merge request by email](../user/project/merge_requests/index.md#create-new-merge-requests-by-email):
+- [New merge request by email](../user/project/merge_requests/creating_merge_requests.md#create-new-merge-requests-by-email):
allow GitLab users to create a new merge request by sending an email to a
user-specific email address.
- [Service Desk](../user/project/service_desk.md): provide e-mail support to
@@ -79,7 +79,7 @@ email address in order to sign up.
If you also host a public-facing GitLab instance at `hooli.com` and set your
incoming email domain to `hooli.com`, an attacker could abuse the "Create new
issue by email" or
-"[Create new merge request by email](../user/project/merge_requests/index.md#create-new-merge-requests-by-email)"
+"[Create new merge request by email](../user/project/merge_requests/creating_merge_requests.md#create-new-merge-requests-by-email)"
features by using a project's unique address as the email when signing up for
Slack, which would send a confirmation email, which would create a new issue or
merge request on the project owned by the attacker, allowing them to click the
diff --git a/doc/administration/index.md b/doc/administration/index.md
index 8e616517c28..bf21347fb99 100644
--- a/doc/administration/index.md
+++ b/doc/administration/index.md
@@ -119,7 +119,7 @@ Learn how to install, configure, update, and maintain your GitLab instance.
- [Auditor users](auditor_users.md): Users with read-only access to all projects, groups, and other resources on the GitLab instance. **(PREMIUM ONLY)**
- [Incoming email](incoming_email.md): Configure incoming emails to allow
users to [reply by email](reply_by_email.md), create [issues by email](../user/project/issues/managing_issues.md#new-issue-via-email) and
- [merge requests by email](../user/project/merge_requests/index.md#create-new-merge-requests-by-email), and to enable [Service Desk](../user/project/service_desk.md).
+ [merge requests by email](../user/project/merge_requests/creating_merge_requests.md#create-new-merge-requests-by-email), and to enable [Service Desk](../user/project/service_desk.md).
- [Postfix for incoming email](reply_by_email_postfix_setup.md): Set up a
basic Postfix mail server with IMAP authentication on Ubuntu for incoming
emails.
diff --git a/doc/ci/README.md b/doc/ci/README.md
index 5286764d178..d1cf7e63c63 100644
--- a/doc/ci/README.md
+++ b/doc/ci/README.md
@@ -132,7 +132,7 @@ Its feature set is listed on the table below according to DevOps stages.
| [Container Scanning](../user/application_security/container_scanning/index.md) **(ULTIMATE)** | Check your Docker containers for known vulnerabilities.|
| [Dependency Scanning](../user/application_security/dependency_scanning/index.md) **(ULTIMATE)** | Analyze your dependencies for known vulnerabilities. |
| [License Compliance](../user/application_security/license_compliance/index.md) **(ULTIMATE)** | Search your project dependencies for their licenses. |
-| [Security Test reports](../user/project/merge_requests/index.md#security-reports-ultimate) **(ULTIMATE)** | Check for app vulnerabilities. |
+| [Security Test reports](../user/application_security/index.md) **(ULTIMATE)** | Check for app vulnerabilities. |
## Examples
diff --git a/doc/ci/introduction/index.md b/doc/ci/introduction/index.md
index a644a89eee4..c43705d034b 100644
--- a/doc/ci/introduction/index.md
+++ b/doc/ci/introduction/index.md
@@ -207,7 +207,7 @@ With GitLab CI/CD you can also:
- Deploy your app to different [environments](../environments.md).
- Install your own [GitLab Runner](https://docs.gitlab.com/runner/).
- [Schedule pipelines](../../user/project/pipelines/schedules.md).
-- Check for app vulnerabilities with [Security Test reports](../../user/project/merge_requests/index.md#security-reports-ultimate). **(ULTIMATE)**
+- Check for app vulnerabilities with [Security Test reports](../../user/application_security/index.md). **(ULTIMATE)**
To see all CI/CD features, navigate back to the [CI/CD index](../README.md).
diff --git a/doc/development/code_review.md b/doc/development/code_review.md
index a19f40d1824..77c57bb332d 100644
--- a/doc/development/code_review.md
+++ b/doc/development/code_review.md
@@ -170,8 +170,8 @@ Maintainers should check before merging if the merge request is approved by the
required approvers.
Maintainers must check before merging if the merge request is introducing new
-vulnerabilities, by inspecting the list in the Merge Request [Security
-Widget](../user/project/merge_requests/index.md#security-reports-ultimate).
+vulnerabilities, by inspecting the list in the Merge Request
+[Security Widget](../user/application_security/index.md).
When in doubt, a [Security Engineer](https://about.gitlab.com/company/team/) can be involved. The list of detected
vulnerabilities must be either empty or containing:
diff --git a/doc/development/testing_guide/end_to_end/best_practices.md b/doc/development/testing_guide/end_to_end/best_practices.md
index 042879b47aa..e73c6a61fb1 100644
--- a/doc/development/testing_guide/end_to_end/best_practices.md
+++ b/doc/development/testing_guide/end_to_end/best_practices.md
@@ -65,3 +65,23 @@ This library [saves the screenshots in the RSpec's `after` hook](https://github.
Given this fact, we should limit the use of `before(:all)` to only those operations where a screenshot is not
necessary in case of failure and QA logs would be enough for debugging.
+
+## Ensure tests do not leave the browser logged in
+
+All QA tests expect to be able to log in at the start of the test.
+
+That's not possible if a test leaves the browser logged in when it finishes. Normally this isn't a problem because [Capybara resets the session after each test](https://github.com/teamcapybara/capybara/blob/9ebc5033282d40c73b0286e60217515fd1bb0b5d/lib/capybara/rspec.rb#L18). But Capybara does that in an `after` block, so when a test logs in in an `after(:context)` block, the browser returns to a logged in state *after* Capybara had logged it out. And so the next test will fail.
+
+For an example see: <https://gitlab.com/gitlab-org/gitlab/issues/34736>
+
+Ideally, any actions peformed in an `after(:context)` (or [`before(:context)`](#limit-the-use-of-beforeall-hook)) block would be performed via the API. But if it's necessary to do so via the UI (e.g., if API functionality doesn't exist), make sure to log out at the end of the block.
+
+```ruby
+after(:all) do
+ login unless Page::Main::Menu.perform(&:signed_in?)
+
+ # Do something while logged in
+
+ Page::Main::Menu.perform(&:sign_out)
+end
+```
diff --git a/doc/user/admin_area/diff_limits.md b/doc/user/admin_area/diff_limits.md
index 5117b5f476f..4e24c25de8f 100644
--- a/doc/user/admin_area/diff_limits.md
+++ b/doc/user/admin_area/diff_limits.md
@@ -6,7 +6,7 @@ type: reference
You can set a maximum size for display of diff files (patches).
-For details about diff files, [View changes between files](../project/merge_requests/index.md#view-changes-between-file-versions).
+For details about diff files, [View changes between files](../project/merge_requests/reviewing_and_managing_merge_requests.md#view-changes-between-file-versions).
## Maximum diff patch size
diff --git a/doc/user/group/index.md b/doc/user/group/index.md
index b7f6cec3866..03f5920dc37 100644
--- a/doc/user/group/index.md
+++ b/doc/user/group/index.md
@@ -75,7 +75,7 @@ By doing so:
## Issues and merge requests within a group
Issues and merge requests are part of projects. For a given group, you can view all of the
-[issues](../project/issues/index.md#issues-list) and [merge requests](../project/merge_requests/index.md#merge-requests-per-group) across all projects in that group,
+[issues](../project/issues/index.md#issues-list) and [merge requests](../project/merge_requests/reviewing_and_managing_merge_requests.md#view-merge-requests-for-all-projects-in-a-group) across all projects in that group,
together in a single list view.
### Bulk editing issues and merge requests
diff --git a/doc/user/index.md b/doc/user/index.md
index 0c6fb0aa5e2..ab953b6d8bf 100644
--- a/doc/user/index.md
+++ b/doc/user/index.md
@@ -50,10 +50,10 @@ GitLab is a Git-based platform that integrates a great number of essential tools
With GitLab Enterprise Edition, you can also:
- Provide support with [Service Desk](project/service_desk.md).
-- Improve collaboration with
- [Merge Request Approvals](project/merge_requests/index.md#merge-request-approvals-starter),
- [Multiple Assignees for Issues](project/issues/multiple_assignees_for_issues.md),
- and [Multiple Issue Boards](project/issue_board.md#multiple-issue-boards).
+- Improve collaboration with:
+ - [Merge Request Approvals](project/merge_requests/merge_request_approvals.md). **(STARTER)**
+ - [Multiple Assignees for Issues](project/issues/multiple_assignees_for_issues.md). **(STARTER)**
+ - [Multiple Issue Boards](project/issue_board.md#multiple-issue-boards).
- Create formal relationships between issues with [Related Issues](project/issues/related_issues.md).
- Use [Burndown Charts](project/milestones/burndown_charts.md) to track progress during a sprint or while working on a new version of their software.
- Leverage [Elasticsearch](../integration/elasticsearch.md) with [Advanced Global Search](search/advanced_global_search.md) and [Advanced Syntax Search](search/advanced_search_syntax.md) for faster, more advanced code search across your entire GitLab instance.
diff --git a/doc/user/project/merge_requests/creating_merge_requests.md b/doc/user/project/merge_requests/creating_merge_requests.md
new file mode 100644
index 00000000000..084ebf32a92
--- /dev/null
+++ b/doc/user/project/merge_requests/creating_merge_requests.md
@@ -0,0 +1,156 @@
+---
+type: index, reference
+---
+
+# Creating merge requests
+
+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.
+
+## Creating new merge requests
+
+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.
+
+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.
+
+If you have recently pushed changes to GitLab, the **Create merge request** button will
+also appear 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.
+
+## Workflow for new merge requests
+
+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.
+
+From here, you can also:
+
+- 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).
+
+Many of these can be set when pushing changes from the command line, with
+[Git push options](../push_options.md).
+
+### 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 will set 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.
+
+## 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's 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).
+
+## Deleting the source branch
+
+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).
+
+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.
+
+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.
+
+![Delete source branch status](img/remove_source_branch_status.png)
+
+## Create new merge requests by email
+
+_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._
+
+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
+a **Email a new merge request to this project** button. The subject will be
+used as the source branch name for the new merge request and the target branch
+will be the default branch for the project. The message body (if not empty)
+will be used as the merge request description. You need
+["Reply by email"](../../../administration/reply_by_email.md) enabled to use
+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.
+You can add this address to your contact list for easy access.
+
+![Create new merge requests by email](img/create_from_email.png)
+
+_In GitLab 11.7, we updated the format of the generated email address.
+However the older format is still supported, allowing existing aliases
+or contacts to continue working._
+
+### Adding patches when creating a merge request via e-mail
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/22723) in GitLab 11.5.
+
+You can add commits to the merge request being created by adding
+patches as attachments to the email. All attachments with a filename
+ending in `.patch` will be considered patches and they will be processed
+ordered by name.
+
+The combined size of the patches can be 2MB.
+
+If the source branch from the subject does not exist, it will be
+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.
diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md
index 97bd5dc3bc6..1ca8c882ac7 100644
--- a/doc/user/project/merge_requests/index.md
+++ b/doc/user/project/merge_requests/index.md
@@ -1,5 +1,5 @@
---
-type: index, reference, concepts
+type: index, reference
---
# Merge requests
@@ -9,45 +9,9 @@ to source code that exist as commits on a given Git branch.
![Merge request view](img/merge_request.png)
-## Overview
-
-A Merge Request (**MR**) is the basis of GitLab as a code collaboration
-and version control platform.
-It is as 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#threads) 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#visualizing-pipelines)
-- [Automatically close the issue(s)](../../project/issues/managing_issues.md#closing-issues-automatically) 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](../time_tracking.md#time-tracking)
-- [Resolve merge conflicts from the UI](#resolve-conflicts)
-- Enable [fast-forward merge requests](#fast-forward-merge-requests)
-- Enable [semi-linear history merge requests](#semi-linear-history-merge-requests) as another security layer to guarantee the pipeline is passing in the target branch
-- [Create new merge requests by email](#create-new-merge-requests-by-email)
-- [Allow collaboration](allow_collaboration.md) so members of the target project can push directly to the fork
-- [Squash and merge](squash_and_merge.md) for a cleaner commit history
-
-With **[GitLab Enterprise Edition][ee]**, you can also:
-
-- Prepare a full review and submit it once it's ready with [Merge Request Reviews](../../discussions/index.md#merge-request-reviews-premium) **(PREMIUM)**
-- View the deployment process across projects with [Multi-Project Pipelines](../../../ci/multi_project_pipelines.md) **(PREMIUM)**
-- Request [approvals](merge_request_approvals.md) from your managers **(STARTER)**
-- Analyze the impact of your changes with [Code Quality reports](code_quality.md) **(STARTER)**
-- Manage the licenses of your dependencies with [License Compliance](../../application_security/license_compliance/index.md) **(ULTIMATE)**
-- Analyze your source code for vulnerabilities with [Static Application Security Testing](../../application_security/sast/index.md) **(ULTIMATE)**
-- Analyze your running web applications for vulnerabilities with [Dynamic Application Security Testing](../../application_security/dast/index.md) **(ULTIMATE)**
-- Analyze your dependencies for vulnerabilities with [Dependency Scanning](../../application_security/dependency_scanning/index.md) **(ULTIMATE)**
-- Analyze your Docker images for vulnerabilities with [Container Scanning](../../application_security/container_scanning/index.md) **(ULTIMATE)**
-- Determine the performance impact of changes with [Browser Performance Testing](#browser-performance-testing-premium) **(PREMIUM)**
-- Specify merge order dependencies with [Merge Request Dependencies](#merge-request-dependencies-premium) **(PREMIUM)**
+A Merge Request (**MR**) is the basis of GitLab as a code collaboration and version
+control platform. It is as simple as the name implies: a _request_ to _merge_ one
+branch into another.
## Use cases
@@ -58,8 +22,11 @@ A. Consider you are a software developer working in a 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-starter) from your manager
-1. Your manager pushes a commit with their final review, [approves the merge request](merge_request_approvals.md), and set it to [merge when pipeline succeeds](#merge-when-pipeline-succeeds) (Merge Request Approvals are available in GitLab Starter)
+1. You request the [approval](merge_request_approvals.md) from your manager **(STARTER)**
+1. Your manager:
+ 1. Pushes a commit with their final review
+ 1. [Approves the merge request](merge_request_approvals.md) **(STARTER)**
+ 1. Sets it to [merge when pipeline succeeds](merge_when_pipeline_succeeds.md)
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
@@ -71,554 +38,112 @@ B. Consider you're a web developer writing a webpage for your company's website:
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) the merge commit into production
-
-## Merge requests per project
-
-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).
-
-![Project merge requests list view](img/project_merge_requests_list_view.png)
-
-## Merge requests per group
-
-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.
-
-![Group Issues list view](img/group_merge_requests_list_view.png)
-
-## Deleting the source branch
-
-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).
-
-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.
-
-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.
-
-![Delete source branch status](img/remove_source_branch_status.png)
-
-## Allow collaboration on merge requests across forks
-
-When a user opens a merge request from a fork, they are given the option to allow
-upstream maintainers to collaborate with them on the source branch. This allows
-the maintainers of the upstream project to make small fixes or rebase branches
-before merging, reducing the back and forth of accepting community contributions.
-
-[Learn more about allowing upstream members to push to forks.](allow_collaboration.md)
+1. Your production team [cherry picks](cherry_pick_changes.md) the merge commit into production
+
+## 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 |
+
+## 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. |
+
+## Testing and reports in merge requests
+
+GitLab has the ability to test the changes included in a merge request, and can display
+or link to useful information directly in the merge request page:
+
+| Feature | Description |
+|--------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| [Browser Performance Testing](browser_performance_testing.md) **(PREMIUM)** | Quickly determine the performance impact of pending code changes. |
+| [Code Quality](code_quality.md) **(STARTER)** | Analyze your source code quality using the [Code Climate](https://codeclimate.com/) analyzer and show the Code Climate report right in the merge request widget area. |
+| [Display arbitrary job artifacts](../../../ci/yaml/README.md#artifactsexpose_as) | Configure CI pipelines with the `artifacts:expose_as` parameter to directly link to selected [artifacts](../pipelines/job_artifacts.md) in merge requests. |
+| [GitLab CI/CD](../../../ci/README.md) | Build, test, and deploy your code in a per-branch basis with built-in CI/CD. |
+| [JUnit test reports](../../../ci/junit_test_reports.md) | Configure your CI jobs to use JUnit test reports, and let GitLab display a report on the merge request so that it’s easier and faster to identify the failure without having to check the entire job log. |
+| [Metrics Reports](../../../ci/metrics_reports.md) **(PREMIUM)** | Display the Metrics Report on the merge request so that it's fast and easy to identify changes to important metrics. |
+| [Multi-Project pipelines](../../../ci/multi_project_pipelines.md) **(PREMIUM)** | When you set up GitLab CI/CD across multiple projects, you can visualize the entire pipeline, including all cross-project interdependencies. |
+| [Pipelines for merge requests](../../../ci/merge_request_pipelines/index.md) | Customize a specific pipeline structure for merge requests in order to speed the cycle up by running only important jobs. |
+| [Pipeline Graphs](../../../ci/pipelines.md#visualizing-pipelines) | View the status of pipelines within the merge request, including the deployment process. |
+
+### Security Reports **(ULTIMATE)**
+
+In addition to the reports listed above, GitLab can do many types of [Security reports](../../application_security/index.md),
+generated by scanning and reporting any vulnerabilities found in your project:
+
+| Feature | Description |
+|-----------------------------------------------------------------------------------------|------------------------------------------------------------------|
+| [Container Scanning](../../application_security/container_scanning/index.md) | Analyze your Docker images for known vulnerabilities. |
+| [Dynamic Application Security Testing (DAST)](../../application_security/dast/index.md) | Analyze your running web applications for known vulnerabilities. |
+| [Dependency Scanning](../../application_security/dependency_scanning/index.md) | Analyze your dependencies for known vulnerabilities. |
+| [License Compliance](../../application_security/license_compliance/index.md) | Manage the licenses of your dependencies. |
+| [Static Application Security Testing (SAST)](../../application_security/sast/index.md) | Analyze your source code for known vulnerabilities. |
## 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 [protected branches](../protected_branches.md) 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)
-
-## Semi-linear history merge requests
-
-A merge commit is created for every merge, but the branch is only merged if
-a fast-forward merge is possible. This ensures that if the merge request build
-succeeded, the target branch build will also succeed after merging.
-
-Navigate to a project's settings, select the **Merge commit with semi-linear
-history** option under **Merge Requests: Merge method** and save your changes.
-
-## Fast-forward merge requests
-
-If you prefer a linear Git history and a way to accept merge requests without
-creating merge commits, you can configure this on a per-project basis.
-
-[Read more about fast-forward merge requests.](fast_forward_merge.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 threads 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 threads that are no longer relevant.
-
-[Read more about resolving threads in merge requests reviews.](../../discussions/index.md)
-
-## View changes between file versions
-
-The **Changes** tab of a merge request shows the changes to files between branches or
-commits. This view of changes to a file is also known as a **diff**. By default, the diff view
-compares the file in the merge request branch and the file in the target branch.
-
-The diff view includes the following:
-
-- The file's name and path.
-- The number of lines added and deleted.
-- Buttons for the following options:
- - Toggle comments for this file; useful for inline reviews.
- - Edit the file in the merge request's branch.
- - Show full file, in case you want to look at the changes in context with the rest of the file.
- - View file at the current commit.
- - Preview the changes with [Review Apps](../../../ci/review_apps/index.md).
-- The changed lines, with the specific changes highlighted.
-
-![Example screenshot of a source code diff](img/merge_request_diff_v12_2.png)
-
-## Commenting on any file line in merge requests
-
-> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/13950) in GitLab 11.5.
-
-GitLab provides a way of leaving comments in any part of the file being changed
-in a Merge Request. To do so, click the **...** button in the gutter of the Merge Request diff UI to expand the diff lines and leave a comment, just as you would for a changed line.
-
-![Comment on any diff file line](img/comment-on-any-diff-line.png)
-
-## Perform a Review **(PREMIUM)**
-
-Start a review in order to create multiple comments on a diff and publish them once you're ready.
-Starting a review allows you to get all your thoughts in order and ensure you haven't missed anything
-before submitting all your comments.
-
-[Learn more about Merge Request Reviews](../../discussions/index.md#merge-request-reviews-premium)
-
-## Squash and merge
-
-GitLab allows you to squash all changes present in a merge request into a single
-commit when merging, to allow for a neater commit history.
-
-[Learn more about squash and merge.](squash_and_merge.md)
-
-## Suggest changes
-
-> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/18008) in GitLab 11.6.
-
-As a reviewer, you can add suggestions to change the content in
-merge request threads, and users with appropriate [permission](../../permissions.md)
-can easily apply them to the codebase directly from the UI. Read
-through the documentation on [Suggest changes](../../discussions/index.md#suggest-changes)
-to learn more.
-
-## 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's 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).
-
-## 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)
-
-## Create new merge requests by email
-
-_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._
-
-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
-a **Email a new merge request to this project** button. The subject will be
-used as the source branch name for the new merge request and the target branch
-will be the default branch for the project. The message body (if not empty)
-will be used as the merge request description. You need
-["Reply by email"](../../../administration/reply_by_email.md) enabled to use
-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.
-You can add this address to your contact list for easy access.
-
-![Create new merge requests by email](img/create_from_email.png)
-
-_In GitLab 11.7, we updated the format of the generated email address.
-However the older format is still supported, allowing existing aliases
-or contacts to continue working._
-
-### Adding patches when creating a merge request via e-mail
-
-> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/22723) in GitLab 11.5.
-
-You can add commits to the merge request being created by adding
-patches as attachments to the email. All attachments with a filename
-ending in `.patch` will be considered patches and they will be processed
-ordered by name.
-
-The combined size of the patches can be 2MB.
-
-If the source branch from the subject does not exist, it will be
-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.
-
-## Use Git push options with merge requests
-
-Use [Git push options](../push_options.md) to create or update merge requests when
-pushing changes to GitLab with Git, without needing to use the GitLab interface.
-
-## Find the merge request that introduced a change
-
-> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/2383) in GitLab 10.5.
-
-When viewing the commit details page, GitLab will link to the merge request (or
-merge requests, if it's in more than one) containing that commit.
-
-This only applies to commits that are in the most recent version of a merge
-request - if a commit was in a merge request, then rebased out of that merge
-request, they will not be linked.
-
-[Read more about merge request versions](versions.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 merge request 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 setting a merge request as "Work In Progress".](work_in_progress_merge_requests.md)
-
-## Merge Requests for Confidential Issues
-
-Create [merge requests to resolve confidential issues](../issues/confidential_issues.md#merge-requests-for-confidential-issues)
-for preventing leakage or early release of sensitive data through regular merge requests.
-
-## Merge request approvals **(STARTER)**
-
-> Included in [GitLab Starter](https://about.gitlab.com/product/).
-
-If you want to make sure every merge request is approved by one or more people,
-you can enforce this workflow by using merge request approvals. Merge request
-approvals allow you to set the number of necessary approvals and predefine a
-list of approvers that will need to approve every merge request in a project.
-
-[Read more about merge request approvals.](merge_request_approvals.md)
-
-## Code Quality **(STARTER)**
-
-> Introduced in [GitLab Starter](https://about.gitlab.com/product/) 9.3.
-
-If you are using [GitLab CI][ci], you can analyze your source code quality using
-the [Code Climate][cc] analyzer [Docker image][cd]. Going a step further, GitLab
-can show the Code Climate report right in the merge request widget area.
-
-[Read more about Code Quality reports.](code_quality.md)
-
-## Metrics Reports **(PREMIUM)**
-
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/9788) in [GitLab Premium](https://about.gitlab.com/product/) 11.10.
-Requires GitLab Runner 11.10 and above.
-
-If you are using [GitLab CI][ci], you can configure your job to output custom
-metrics and GitLab will display the Metrics Report on the merge request so
-that it's fast and easy to identify changes to important metrics.
-
-[Read more about Metrics Report](../../../ci/metrics_reports.md).
-
-## Browser Performance Testing **(PREMIUM)**
-
-> Introduced in [GitLab Premium](https://about.gitlab.com/product/) 10.3.
-
-If your application offers a web interface and you are using [GitLab CI/CD][ci], you can quickly determine the performance impact of pending code changes. GitLab uses [Sitespeed.io][sitespeed], a free and open source tool for measuring the performance of web sites, to analyze the performance of specific pages.
-
-GitLab runs the [Sitespeed.io container][sitespeed-container] and displays the difference in overall performance scores between the source and target branches.
-
-[Read more about Browser Performance Testing.](browser_performance_testing.md)
-
-## Merge Request Dependencies **(PREMIUM)**
-
-> Introduced in [GitLab Premium](https://about.gitlab.com/product/) 12.2.
-
-A single logical change may be split across several merge requests, across
-several projects. When this happens, the order in which MRs are merged is
-important.
-
-GitLab allows you to specify that a merge request depends on other MRs. With
-this relationship in place, the merge request cannot be merged until all of its
-dependencies have also been merged, helping to maintain the consistency of a
-single logical change.
-
-[Read more about merge request dependencies.](merge_request_dependencies.md)
-
-## Security reports **(ULTIMATE)**
-
-GitLab can scan and report any vulnerabilities found in your project.
-
-[Read more about security reports.](../../application_security/index.md)
-
-## JUnit test reports
-
-Configure your CI jobs to use JUnit test reports, and let GitLab display a report
-on the merge request so that it’s easier and faster to identify the failure
-without having to check the entire job log.
-
-[Read more about JUnit test reports](../../../ci/junit_test_reports.md).
-
-## Merge request diff file navigation
-
-When reviewing changes in the **Changes** tab the diff can be navigated using
-the file tree or file list. As you scroll through large diffs with many
-changes, you can quickly jump to any changed file using the file tree or file
-list.
-
-![Merge request diff file navigation](img/merge_request_diff_file_navigation.png)
-
-### Incrementally expand merge request diffs
-
-By default, the diff shows only the parts of a file which are changed.
-To view more unchanged lines above or below a change click on the
-**Expand up** or **Expand down** icons. You can also click on **Show all lines**
-to expand the entire file.
-
-![Incrementally expand merge request diffs](img/incrementally_expand_merge_request_diffs_v12_2.png)
-
-## 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/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).
-
-## Pipelines for merge requests
-
-When a developer updates a merge request, a pipeline should quickly report back
-its result to the developer, but often pipelines take long time to complete
-because general branch pipelines contain unnecessary jobs from the merge request standpoint.
-You can customize a specific pipeline structure for merge requests in order to
-speed the cycle up by running only important jobs.
-
-Learn more about [pipelines for merge requests](../../../ci/merge_request_pipelines/index.md).
-
-## Pipeline status in merge requests
-
-If you've set up [GitLab CI/CD](../../../ci/README.md) in your project,
-you will be able to see:
-
-- Both pre and post-merge pipelines and the environment information if any.
-- Which deployments are in progress.
-
-If there's an [environment](../../../ci/environments.md) and the application is
-successfully deployed to it, the deployed environment and the link to the
-Review App will be shown as well.
-
-### Post-merge pipeline status
-
-When a merge request is merged, you can see the post-merge pipeline status of
-the branch the merge request was merged into. For example, when a merge request
-is merged into the master branch and then triggers a deployment to the staging
-environment.
-
-Deployments that are ongoing will be shown, as well as the deploying/deployed state
-for environments. If it's the first time the branch is deployed, the link
-will return a `404` error until done. During the deployment, the stop button will
-be disabled. If the pipeline fails to deploy, the deployment info will be hidden.
-
-![Merge request pipeline](img/merge_request_pipeline.png)
-
-For more information, [read about pipelines](../../../ci/pipelines.md).
-
-## Bulk editing merge requests
-
-Find out about [bulk editing merge requests](../../project/bulk_editing.md).
-
-## Display arbitrary job artifacts
-
-To configure pipelines to job [artifacts](../pipelines/job_artifacts.md) that can be displayed in
-merge requests, see [`artifacts:expose_as`](../../../ci/yaml/README.md#artifactsexpose_as).
-
-## Troubleshooting
-
-Sometimes things don't go as expected in a merge request, here are some
-troubleshooting steps.
-
-### Merge request cannot retrieve the pipeline status
-
-This can occur if Sidekiq doesn't pick up the changes fast enough.
-
-#### Sidekiq
-
-Sidekiq didn't process the CI state change fast enough. Please wait a few
-seconds and the status will update automatically.
-
-#### Bug
-
-Merge Request pipeline statuses can't be retrieved when the following occurs:
-
-1. A Merge Request is created
-1. The Merge Request is closed
-1. Changes are made in the project
-1. The Merge Request is reopened
-
-To enable the pipeline status to be properly retrieved, close and reopen the
-Merge Request again.
-
-## 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 `origin` remote, do:
-
-```
-git mr origin 5
-```
-
-This will fetch the merge request into a local `mr-origin-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-foss.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-foss.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-foss.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
-```
-
-All the above can be done with the [`git-mr`](https://gitlab.com/glensc/git-mr) script.
-
-[protected branches]: ../protected_branches.md
-[ci]: ../../../ci/README.md
-[cc]: https://codeclimate.com/
-[cd]: https://hub.docker.com/r/codeclimate/codeclimate/
-[sitespeed]: https://www.sitespeed.io
-[sitespeed-container]: https://hub.docker.com/r/sitespeedio/sitespeed.io/
-[ee]: https://about.gitlab.com/pricing/ "GitLab Enterprise Edition"
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
new file mode 100644
index 00000000000..f693b0b1e72
--- /dev/null
+++ b/doc/user/project/merge_requests/reviewing_and_managing_merge_requests.md
@@ -0,0 +1,251 @@
+---
+type: index, reference
+---
+
+# Reviewing and managing merge requests
+
+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](creating_merge_requests.md),
+which is then reviewed, and accepted (or rejected).
+
+## View project merge requests
+
+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).
+
+![Project merge requests list view](img/project_merge_requests_list_view.png)
+
+## View merge requests for all projects in a group
+
+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.
+
+![Group Issues list view](img/group_merge_requests_list_view.png)
+
+## Semi-linear history merge requests
+
+A merge commit is created for every merge, but the branch is only merged if
+a fast-forward merge is possible. This ensures that if the merge request build
+succeeded, the target branch build will also succeed after merging.
+
+Navigate to a project's settings, select the **Merge commit with semi-linear history**
+option under **Merge Requests: Merge method** and save your changes.
+
+## View changes between file versions
+
+The **Changes** tab, below the main merge request details and next to the discussion tab,
+shows the changes to files between branches or commits. This view of changes to a
+file is also known as a **diff**. By default, the diff view compares the file in the
+merge request branch and the file in the target branch.
+
+The diff view includes the following:
+
+- The file's name and path.
+- The number of lines added and deleted.
+- Buttons for the following options:
+ - Toggle comments for this file; useful for inline reviews.
+ - Edit the file in the merge request's branch.
+ - Show full file, in case you want to look at the changes in context with the rest of the file.
+ - View file at the current commit.
+ - Preview the changes with [Review Apps](../../../ci/review_apps/index.md).
+- The changed lines, with the specific changes highlighted.
+
+![Example screenshot of a source code diff](img/merge_request_diff_v12_2.png)
+
+### Merge request diff file navigation
+
+When reviewing changes in the **Changes** tab the diff can be navigated using
+the file tree or file list. As you scroll through large diffs with many
+changes, you can quickly jump to any changed file using the file tree or file
+list.
+
+![Merge request diff file navigation](img/merge_request_diff_file_navigation.png)
+
+### Incrementally expand merge request diffs
+
+By default, the diff shows only the parts of a file which are changed.
+To view more unchanged lines above or below a change click on the
+**Expand up** or **Expand down** icons. You can also click on **Show all lines**
+to expand the entire file.
+
+![Incrementally expand merge request diffs](img/incrementally_expand_merge_request_diffs_v12_2.png)
+
+### 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.
+
+## Commenting on any file line in merge requests
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/13950) in GitLab 11.5.
+
+GitLab provides a way of leaving comments in any part of the file being changed
+in a Merge Request. To do so, click the **...** button in the gutter of the Merge Request diff UI to expand the diff lines and leave a comment, just as you would for a changed line.
+
+![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
+
+If you've set up [GitLab CI/CD](../../../ci/README.md) in your project,
+you will be able to see:
+
+- Both pre and post-merge pipelines and the environment information if any.
+- Which deployments are in progress.
+
+If there's an [environment](../../../ci/environments.md) and the application is
+successfully deployed to it, the deployed environment and the link to the
+Review App will be shown as well.
+
+### Post-merge pipeline status
+
+When a merge request is merged, you can see the post-merge pipeline status of
+the branch the merge request was merged into. For example, when a merge request
+is merged into the master branch and then triggers a deployment to the staging
+environment.
+
+Deployments that are ongoing will be shown, as well as the deploying/deployed state
+for environments. If it's the first time the branch is deployed, the link
+will return a `404` error until done. During the deployment, the stop button will
+be disabled. If the pipeline fails to deploy, the deployment info will be hidden.
+
+![Merge request pipeline](img/merge_request_pipeline.png)
+
+For more information, [read about pipelines](../../../ci/pipelines.md).
+
+## Troubleshooting
+
+Sometimes things don't go as expected in a merge request, here are some
+troubleshooting steps.
+
+### Merge request cannot retrieve the pipeline status
+
+This can occur if Sidekiq doesn't pick up the changes fast enough.
+
+#### Sidekiq
+
+Sidekiq didn't process the CI state change fast enough. Please wait a few
+seconds and the status will update automatically.
+
+#### Bug
+
+Merge Request pipeline statuses can't be retrieved when the following occurs:
+
+1. A Merge Request is created
+1. The Merge Request is closed
+1. Changes are made in the project
+1. The Merge Request is reopened
+
+To enable the pipeline status to be properly retrieved, close and reopen the
+Merge Request again.
+
+## 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 `origin` remote, do:
+
+```
+git mr origin 5
+```
+
+This will fetch the merge request into a local `mr-origin-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-foss.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-foss.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-foss.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
+```
+
+All the above can be done with the [`git-mr`](https://gitlab.com/glensc/git-mr) script.
diff --git a/doc/user/project/merge_requests/versions.md b/doc/user/project/merge_requests/versions.md
index fbe216c3aed..ffd0efb365a 100644
--- a/doc/user/project/merge_requests/versions.md
+++ b/doc/user/project/merge_requests/versions.md
@@ -35,6 +35,17 @@ changes appears as a system note.
![Merge request versions system note](img/versions_system_note.png)
+## Find the merge request that introduced a change
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/2383) in GitLab 10.5.
+
+When viewing the commit details page, GitLab will link to the merge request (or
+merge requests, if it's in more than one) containing that commit.
+
+This only applies to commits that are in the most recent version of a merge
+request - if a commit was in a merge request, then rebased out of that merge
+request, they will not be linked.
+
<!-- ## Troubleshooting
Include any troubleshooting steps that you can foresee. If you know beforehand what issues
diff --git a/doc/user/project/settings/index.md b/doc/user/project/settings/index.md
index 7c8ae2702a2..2dc507901d0 100644
--- a/doc/user/project/settings/index.md
+++ b/doc/user/project/settings/index.md
@@ -53,7 +53,7 @@ Set up your project's merge request settings:
- Enable [merge request approvals](../merge_requests/merge_request_approvals.md). **(STARTER)**
- Enable [merge only if pipeline succeeds](../merge_requests/merge_when_pipeline_succeeds.md).
- Enable [merge only when all threads are resolved](../../discussions/index.md#only-allow-merge-requests-to-be-merged-if-all-threads-are-resolved).
-- Enable [`delete source branch after merge` option by default](../merge_requests/index.md#deleting-the-source-branch)
+- Enable [`delete source branch after merge` option by default](../merge_requests/creating_merge_requests.md#deleting-the-source-branch)
![project's merge request settings](img/merge_requests_settings.png)
diff --git a/locale/ar_SA/gitlab.po b/locale/ar_SA/gitlab.po
index a5ebf2bc24c..322db0c0322 100644
--- a/locale/ar_SA/gitlab.po
+++ b/locale/ar_SA/gitlab.po
@@ -7791,7 +7791,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/bg/gitlab.po b/locale/bg/gitlab.po
index 8aa6c308b50..0b6e55cab8e 100644
--- a/locale/bg/gitlab.po
+++ b/locale/bg/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/bn_BD/gitlab.po b/locale/bn_BD/gitlab.po
index c001b526690..291dca380fc 100644
--- a/locale/bn_BD/gitlab.po
+++ b/locale/bn_BD/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/bn_IN/gitlab.po b/locale/bn_IN/gitlab.po
index 69bc24d65bb..f95d71eec5d 100644
--- a/locale/bn_IN/gitlab.po
+++ b/locale/bn_IN/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/ca_ES/gitlab.po b/locale/ca_ES/gitlab.po
index a5db388bb2d..a30f508f4b6 100644
--- a/locale/ca_ES/gitlab.po
+++ b/locale/ca_ES/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr "Enrere"
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/cs_CZ/gitlab.po b/locale/cs_CZ/gitlab.po
index a03802a6b41..b9fd29985ae 100644
--- a/locale/cs_CZ/gitlab.po
+++ b/locale/cs_CZ/gitlab.po
@@ -7669,7 +7669,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/cy_GB/gitlab.po b/locale/cy_GB/gitlab.po
index 9f99cd0f9a4..c09b3a6695c 100644
--- a/locale/cy_GB/gitlab.po
+++ b/locale/cy_GB/gitlab.po
@@ -7791,7 +7791,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/da_DK/gitlab.po b/locale/da_DK/gitlab.po
index ee9dc800d1a..8747bc5c3c2 100644
--- a/locale/da_DK/gitlab.po
+++ b/locale/da_DK/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/de/gitlab.po b/locale/de/gitlab.po
index 72541b7a0ae..3103adacbf2 100644
--- a/locale/de/gitlab.po
+++ b/locale/de/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr "Zurück"
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/el_GR/gitlab.po b/locale/el_GR/gitlab.po
index d48c7419f4e..e1f4ab78994 100644
--- a/locale/el_GR/gitlab.po
+++ b/locale/el_GR/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/eo/gitlab.po b/locale/eo/gitlab.po
index 4f05f7e9c8e..e7ac98e864a 100644
--- a/locale/eo/gitlab.po
+++ b/locale/eo/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/es/gitlab.po b/locale/es/gitlab.po
index e2eb12b71e3..851123d9c35 100644
--- a/locale/es/gitlab.po
+++ b/locale/es/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr "Go Micro es un framework para el desarrollo de microservicios."
msgid "Go back"
msgstr "Volver"
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr "Volver (mientras busca archivos"
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/et_EE/gitlab.po b/locale/et_EE/gitlab.po
index b4b9c4b9168..7cf77be629a 100644
--- a/locale/et_EE/gitlab.po
+++ b/locale/et_EE/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/fa_IR/gitlab.po b/locale/fa_IR/gitlab.po
index 6dba28671b2..22519e0bfc0 100644
--- a/locale/fa_IR/gitlab.po
+++ b/locale/fa_IR/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/fil_PH/gitlab.po b/locale/fil_PH/gitlab.po
index 4991ee53794..150e5733bdc 100644
--- a/locale/fil_PH/gitlab.po
+++ b/locale/fil_PH/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/fr/gitlab.po b/locale/fr/gitlab.po
index 8a018b18ba7..e1894f867b1 100644
--- a/locale/fr/gitlab.po
+++ b/locale/fr/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr "Retour"
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index a99b275ba23..8bd33a223ee 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -8072,7 +8072,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/gl_ES/gitlab.po b/locale/gl_ES/gitlab.po
index dffad3b6308..9c5817a6bbc 100644
--- a/locale/gl_ES/gitlab.po
+++ b/locale/gl_ES/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/he_IL/gitlab.po b/locale/he_IL/gitlab.po
index 813226fae23..40a8dc37d2d 100644
--- a/locale/he_IL/gitlab.po
+++ b/locale/he_IL/gitlab.po
@@ -7669,7 +7669,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/hi_IN/gitlab.po b/locale/hi_IN/gitlab.po
index e75627165a6..9d986e64534 100644
--- a/locale/hi_IN/gitlab.po
+++ b/locale/hi_IN/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/hr_HR/gitlab.po b/locale/hr_HR/gitlab.po
index a375b198f1e..b24fd8c1468 100644
--- a/locale/hr_HR/gitlab.po
+++ b/locale/hr_HR/gitlab.po
@@ -7608,7 +7608,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/hu_HU/gitlab.po b/locale/hu_HU/gitlab.po
index 1b39fa3a561..3b25068e22a 100644
--- a/locale/hu_HU/gitlab.po
+++ b/locale/hu_HU/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/id_ID/gitlab.po b/locale/id_ID/gitlab.po
index df633eed7a3..860c508e2bc 100644
--- a/locale/id_ID/gitlab.po
+++ b/locale/id_ID/gitlab.po
@@ -7486,7 +7486,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/it/gitlab.po b/locale/it/gitlab.po
index 27c608d98af..c1e48014704 100644
--- a/locale/it/gitlab.po
+++ b/locale/it/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/ja/gitlab.po b/locale/ja/gitlab.po
index d180d391258..0f974ba2df7 100644
--- a/locale/ja/gitlab.po
+++ b/locale/ja/gitlab.po
@@ -7486,7 +7486,7 @@ msgstr ""
msgid "Go back"
msgstr "前に戻る"
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/ka_GE/gitlab.po b/locale/ka_GE/gitlab.po
index 916fe53e00a..8f01df42567 100644
--- a/locale/ka_GE/gitlab.po
+++ b/locale/ka_GE/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/ko/gitlab.po b/locale/ko/gitlab.po
index 5fc741ea76e..67cb7a1a8c0 100644
--- a/locale/ko/gitlab.po
+++ b/locale/ko/gitlab.po
@@ -7486,7 +7486,7 @@ msgstr ""
msgid "Go back"
msgstr "뒤로 가기"
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/mn_MN/gitlab.po b/locale/mn_MN/gitlab.po
index 1cb61c95acf..fa697d18245 100644
--- a/locale/mn_MN/gitlab.po
+++ b/locale/mn_MN/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/nb_NO/gitlab.po b/locale/nb_NO/gitlab.po
index 777b0904a2a..44ff0f9513d 100644
--- a/locale/nb_NO/gitlab.po
+++ b/locale/nb_NO/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/nl_NL/gitlab.po b/locale/nl_NL/gitlab.po
index d91bdf5b9e3..97128936449 100644
--- a/locale/nl_NL/gitlab.po
+++ b/locale/nl_NL/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/pa_IN/gitlab.po b/locale/pa_IN/gitlab.po
index afdb8f86649..9674b40f3cd 100644
--- a/locale/pa_IN/gitlab.po
+++ b/locale/pa_IN/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/pl_PL/gitlab.po b/locale/pl_PL/gitlab.po
index c9cc736d231..3f3656e9c2b 100644
--- a/locale/pl_PL/gitlab.po
+++ b/locale/pl_PL/gitlab.po
@@ -7669,7 +7669,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/pt_BR/gitlab.po b/locale/pt_BR/gitlab.po
index 1c72821aaea..120127de15f 100644
--- a/locale/pt_BR/gitlab.po
+++ b/locale/pt_BR/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr "Go Micro é um framework para desenvolvimento de microsserviços."
msgid "Go back"
msgstr "Voltar"
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/pt_PT/gitlab.po b/locale/pt_PT/gitlab.po
index 994bfcf7920..ef265dc1b8c 100644
--- a/locale/pt_PT/gitlab.po
+++ b/locale/pt_PT/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/ro_RO/gitlab.po b/locale/ro_RO/gitlab.po
index 0ac93f59034..c433d8f5ba2 100644
--- a/locale/ro_RO/gitlab.po
+++ b/locale/ro_RO/gitlab.po
@@ -7608,7 +7608,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/ru/gitlab.po b/locale/ru/gitlab.po
index 9c0e8ab5a19..0571d4745a2 100644
--- a/locale/ru/gitlab.po
+++ b/locale/ru/gitlab.po
@@ -7669,7 +7669,7 @@ msgstr "Go Micro — это фреймворк для разработки ми
msgid "Go back"
msgstr "Вернуться"
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/sk_SK/gitlab.po b/locale/sk_SK/gitlab.po
index 45fc05f8a56..a2a7bc42f0c 100644
--- a/locale/sk_SK/gitlab.po
+++ b/locale/sk_SK/gitlab.po
@@ -7669,7 +7669,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/sq_AL/gitlab.po b/locale/sq_AL/gitlab.po
index 70947dc0aba..072729c9ea2 100644
--- a/locale/sq_AL/gitlab.po
+++ b/locale/sq_AL/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/sr_CS/gitlab.po b/locale/sr_CS/gitlab.po
index 09534393e23..d8c8708cdc7 100644
--- a/locale/sr_CS/gitlab.po
+++ b/locale/sr_CS/gitlab.po
@@ -7608,7 +7608,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/sr_SP/gitlab.po b/locale/sr_SP/gitlab.po
index a612079f1c5..8dc6be6c1ea 100644
--- a/locale/sr_SP/gitlab.po
+++ b/locale/sr_SP/gitlab.po
@@ -7608,7 +7608,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/sv_SE/gitlab.po b/locale/sv_SE/gitlab.po
index 9915b454489..17699450a60 100644
--- a/locale/sv_SE/gitlab.po
+++ b/locale/sv_SE/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/sw_KE/gitlab.po b/locale/sw_KE/gitlab.po
index 55714be9fbc..230cb6fc2e6 100644
--- a/locale/sw_KE/gitlab.po
+++ b/locale/sw_KE/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/tr_TR/gitlab.po b/locale/tr_TR/gitlab.po
index 0f69fbf389d..6958899c85d 100644
--- a/locale/tr_TR/gitlab.po
+++ b/locale/tr_TR/gitlab.po
@@ -7547,7 +7547,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/uk/gitlab.po b/locale/uk/gitlab.po
index b86a1ec198c..be2c217ad8e 100644
--- a/locale/uk/gitlab.po
+++ b/locale/uk/gitlab.po
@@ -7669,7 +7669,7 @@ msgstr "Go Micro — це фреймворк для розробки мікро
msgid "Go back"
msgstr "Повернутися"
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr "Перейти назад (при пошуку файлів"
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/vi_VN/gitlab.po b/locale/vi_VN/gitlab.po
index 508b0e0730b..6369e477289 100644
--- a/locale/vi_VN/gitlab.po
+++ b/locale/vi_VN/gitlab.po
@@ -7486,7 +7486,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/zh_CN/gitlab.po b/locale/zh_CN/gitlab.po
index fe80ec73cd5..2c6a67d6ecc 100644
--- a/locale/zh_CN/gitlab.po
+++ b/locale/zh_CN/gitlab.po
@@ -7486,7 +7486,7 @@ msgstr "Go Micro是一个微服务开发的框架。"
msgid "Go back"
msgstr "返回"
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/zh_HK/gitlab.po b/locale/zh_HK/gitlab.po
index c829642a42e..13f814fe62e 100644
--- a/locale/zh_HK/gitlab.po
+++ b/locale/zh_HK/gitlab.po
@@ -7486,7 +7486,7 @@ msgstr ""
msgid "Go back"
msgstr ""
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/locale/zh_TW/gitlab.po b/locale/zh_TW/gitlab.po
index ee2278bfc64..f533e52c6f1 100644
--- a/locale/zh_TW/gitlab.po
+++ b/locale/zh_TW/gitlab.po
@@ -7486,7 +7486,7 @@ msgstr ""
msgid "Go back"
msgstr "上一頁"
-msgid "Go back (while searching for files"
+msgid "Go back (while searching for files)"
msgstr ""
msgid "Go back to %{startTag}Open issues%{endTag} and select some issues to add to your board."
diff --git a/qa/qa/runtime/browser.rb b/qa/qa/runtime/browser.rb
index 4789b380377..c914526002c 100644
--- a/qa/qa/runtime/browser.rb
+++ b/qa/qa/runtime/browser.rb
@@ -19,6 +19,12 @@ module QA
self.class.configure!
end
+ def self.blank_page?
+ ['', 'about:blank', 'data:,'].include?(Capybara.current_session.driver.browser.current_url)
+ rescue
+ true
+ end
+
##
# Visit a page that belongs to a GitLab instance under given address.
#
diff --git a/qa/spec/spec_helper.rb b/qa/spec/spec_helper.rb
index 363980acc33..ed29bfa41dd 100644
--- a/qa/spec/spec_helper.rb
+++ b/qa/spec/spec_helper.rb
@@ -23,6 +23,24 @@ RSpec.configure do |config|
QA::Runtime::Logger.debug("Starting test: #{example.full_description}") if QA::Runtime::Env.debug?
end
+ config.after(:context) do
+ if !QA::Runtime::Browser.blank_page? && QA::Page::Main::Menu.perform(&:signed_in?)
+ QA::Page::Main::Menu.perform(&:sign_out)
+ raise(
+ <<~ERROR
+ The test left the browser signed in.
+
+ Usually, Capybara prevents this from happening but some things can
+ interfere. For example, if it has an `after(:context)` block that logs
+ in, the browser will stay logged in and this will cause the next test
+ to fail.
+
+ Please make sure the test does not leave the browser signed in.
+ ERROR
+ )
+ end
+ end
+
config.expect_with :rspec do |expectations|
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end
diff --git a/spec/frontend/boards/components/issue_time_estimate_spec.js b/spec/frontend/boards/components/issue_time_estimate_spec.js
new file mode 100644
index 00000000000..0a16dfbc009
--- /dev/null
+++ b/spec/frontend/boards/components/issue_time_estimate_spec.js
@@ -0,0 +1,81 @@
+import IssueTimeEstimate from '~/boards/components/issue_time_estimate.vue';
+import boardsStore from '~/boards/stores/boards_store';
+import { shallowMount } from '@vue/test-utils';
+
+describe('Issue Time Estimate component', () => {
+ let wrapper;
+
+ beforeEach(() => {
+ boardsStore.create();
+ });
+
+ afterEach(() => {
+ wrapper.destroy();
+ });
+
+ describe('when limitToHours is false', () => {
+ beforeEach(() => {
+ boardsStore.timeTracking.limitToHours = false;
+ wrapper = shallowMount(IssueTimeEstimate, {
+ propsData: {
+ estimate: 374460,
+ },
+ sync: false,
+ });
+ });
+
+ it('renders the correct time estimate', () => {
+ expect(
+ wrapper
+ .find('time')
+ .text()
+ .trim(),
+ ).toEqual('2w 3d 1m');
+ });
+
+ it('renders expanded time estimate in tooltip', () => {
+ expect(wrapper.find('.js-issue-time-estimate').text()).toContain('2 weeks 3 days 1 minute');
+ });
+
+ it('prevents tooltip xss', done => {
+ const alertSpy = jest.spyOn(window, 'alert');
+ wrapper.setProps({ estimate: 'Foo <script>alert("XSS")</script>' });
+ wrapper.vm.$nextTick(() => {
+ expect(alertSpy).not.toHaveBeenCalled();
+ expect(
+ wrapper
+ .find('time')
+ .text()
+ .trim(),
+ ).toEqual('0m');
+ expect(wrapper.find('.js-issue-time-estimate').text()).toContain('0m');
+ done();
+ });
+ });
+ });
+
+ describe('when limitToHours is true', () => {
+ beforeEach(() => {
+ boardsStore.timeTracking.limitToHours = true;
+ wrapper = shallowMount(IssueTimeEstimate, {
+ propsData: {
+ estimate: 374460,
+ },
+ sync: false,
+ });
+ });
+
+ it('renders the correct time estimate', () => {
+ expect(
+ wrapper
+ .find('time')
+ .text()
+ .trim(),
+ ).toEqual('104h 1m');
+ });
+
+ it('renders expanded time estimate in tooltip', () => {
+ expect(wrapper.find('.js-issue-time-estimate').text()).toContain('104 hours 1 minute');
+ });
+ });
+});
diff --git a/spec/frontend/boards/issue_card_spec.js b/spec/frontend/boards/issue_card_spec.js
new file mode 100644
index 00000000000..ebe97769ab7
--- /dev/null
+++ b/spec/frontend/boards/issue_card_spec.js
@@ -0,0 +1,307 @@
+/* global ListAssignee, ListLabel, ListIssue */
+import { mount } from '@vue/test-utils';
+import _ from 'underscore';
+import '~/boards/models/label';
+import '~/boards/models/assignee';
+import '~/boards/models/issue';
+import '~/boards/models/list';
+import IssueCardInner from '~/boards/components/issue_card_inner.vue';
+import { listObj } from '../../javascripts/boards/mock_data';
+import store from '~/boards/stores';
+
+describe('Issue card component', () => {
+ const user = new ListAssignee({
+ id: 1,
+ name: 'testing 123',
+ username: 'test',
+ avatar: 'test_image',
+ });
+
+ const label1 = new ListLabel({
+ id: 3,
+ title: 'testing 123',
+ color: 'blue',
+ text_color: 'white',
+ description: 'test',
+ });
+
+ let wrapper;
+ let issue;
+ let list;
+
+ beforeEach(() => {
+ list = { ...listObj, type: 'label' };
+ issue = new ListIssue({
+ title: 'Testing',
+ id: 1,
+ iid: 1,
+ confidential: false,
+ labels: [list.label],
+ assignees: [],
+ reference_path: '#1',
+ real_path: '/test/1',
+ weight: 1,
+ });
+ wrapper = mount(IssueCardInner, {
+ propsData: {
+ list,
+ issue,
+ issueLinkBase: '/test',
+ rootPath: '/',
+ },
+ store,
+ sync: false,
+ });
+ });
+
+ it('renders issue title', () => {
+ expect(wrapper.find('.board-card-title').text()).toContain(issue.title);
+ });
+
+ it('includes issue base in link', () => {
+ expect(wrapper.find('.board-card-title a').attributes('href')).toContain('/test');
+ });
+
+ it('includes issue title on link', () => {
+ expect(wrapper.find('.board-card-title a').attributes('title')).toBe(issue.title);
+ });
+
+ it('does not render confidential icon', () => {
+ expect(wrapper.find('.fa-eye-flash').exists()).toBe(false);
+ });
+
+ it('renders confidential icon', done => {
+ wrapper.setProps({
+ issue: {
+ ...wrapper.props('issue'),
+ confidential: true,
+ },
+ });
+ wrapper.vm.$nextTick(() => {
+ expect(wrapper.find('.confidential-icon').exists()).toBe(true);
+ done();
+ });
+ });
+
+ it('renders issue ID with #', () => {
+ expect(wrapper.find('.board-card-number').text()).toContain(`#${issue.id}`);
+ });
+
+ describe('assignee', () => {
+ it('does not render assignee', () => {
+ expect(wrapper.find('.board-card-assignee .avatar').exists()).toBe(false);
+ });
+
+ describe('exists', () => {
+ beforeEach(done => {
+ wrapper.setProps({
+ issue: {
+ ...wrapper.props('issue'),
+ assignees: [user],
+ },
+ });
+
+ wrapper.vm.$nextTick(done);
+ });
+
+ it('renders assignee', () => {
+ expect(wrapper.find('.board-card-assignee .avatar').exists()).toBe(true);
+ });
+
+ it('sets title', () => {
+ expect(wrapper.find('.js-assignee-tooltip').text()).toContain(`${user.name}`);
+ });
+
+ it('sets users path', () => {
+ expect(wrapper.find('.board-card-assignee a').attributes('href')).toBe('/test');
+ });
+
+ it('renders avatar', () => {
+ expect(wrapper.find('.board-card-assignee img').exists()).toBe(true);
+ });
+ });
+
+ describe('assignee default avatar', () => {
+ beforeEach(done => {
+ wrapper.setProps({
+ issue: {
+ ...wrapper.props('issue'),
+ assignees: [
+ new ListAssignee(
+ {
+ id: 1,
+ name: 'testing 123',
+ username: 'test',
+ },
+ 'default_avatar',
+ ),
+ ],
+ },
+ });
+
+ wrapper.vm.$nextTick(done);
+ });
+
+ it('displays defaults avatar if users avatar is null', () => {
+ expect(wrapper.find('.board-card-assignee img').exists()).toBe(true);
+ expect(wrapper.find('.board-card-assignee img').attributes('src')).toBe(
+ 'default_avatar?width=24',
+ );
+ });
+ });
+ });
+
+ describe('multiple assignees', () => {
+ beforeEach(done => {
+ wrapper.setProps({
+ issue: {
+ ...wrapper.props('issue'),
+ assignees: [
+ new ListAssignee({
+ id: 2,
+ name: 'user2',
+ username: 'user2',
+ avatar: 'test_image',
+ }),
+ new ListAssignee({
+ id: 3,
+ name: 'user3',
+ username: 'user3',
+ avatar: 'test_image',
+ }),
+ new ListAssignee({
+ id: 4,
+ name: 'user4',
+ username: 'user4',
+ avatar: 'test_image',
+ }),
+ ],
+ },
+ });
+
+ wrapper.vm.$nextTick(done);
+ });
+
+ it('renders all three assignees', () => {
+ expect(wrapper.findAll('.board-card-assignee .avatar').length).toEqual(3);
+ });
+
+ describe('more than three assignees', () => {
+ beforeEach(done => {
+ const { assignees } = wrapper.props('issue');
+ assignees.push(
+ new ListAssignee({
+ id: 5,
+ name: 'user5',
+ username: 'user5',
+ avatar: 'test_image',
+ }),
+ );
+
+ wrapper.setProps({
+ issue: {
+ ...wrapper.props('issue'),
+ assignees,
+ },
+ });
+ wrapper.vm.$nextTick(done);
+ });
+
+ it('renders more avatar counter', () => {
+ expect(
+ wrapper
+ .find('.board-card-assignee .avatar-counter')
+ .text()
+ .trim(),
+ ).toEqual('+2');
+ });
+
+ it('renders two assignees', () => {
+ expect(wrapper.findAll('.board-card-assignee .avatar').length).toEqual(2);
+ });
+
+ it('renders 99+ avatar counter', done => {
+ const assignees = [
+ ...wrapper.props('issue').assignees,
+ ..._.range(5, 103).map(
+ i =>
+ new ListAssignee({
+ id: i,
+ name: 'name',
+ username: 'username',
+ avatar: 'test_image',
+ }),
+ ),
+ ];
+ wrapper.setProps({
+ issue: {
+ ...wrapper.props('issue'),
+ assignees,
+ },
+ });
+
+ wrapper.vm.$nextTick(() => {
+ expect(
+ wrapper
+ .find('.board-card-assignee .avatar-counter')
+ .text()
+ .trim(),
+ ).toEqual('99+');
+ done();
+ });
+ });
+ });
+ });
+
+ describe('labels', () => {
+ beforeEach(done => {
+ issue.addLabel(label1);
+ wrapper.setProps({ issue: { ...issue } });
+
+ wrapper.vm.$nextTick(done);
+ });
+
+ it('does not render list label but renders all other labels', () => {
+ expect(wrapper.findAll('.badge').length).toBe(1);
+ });
+
+ it('renders label', () => {
+ const nodes = wrapper
+ .findAll('.badge')
+ .wrappers.map(label => label.attributes('data-original-title'));
+
+ expect(nodes.includes(label1.description)).toBe(true);
+ });
+
+ it('sets label description as title', () => {
+ expect(wrapper.find('.badge').attributes('data-original-title')).toContain(
+ label1.description,
+ );
+ });
+
+ it('sets background color of button', () => {
+ const nodes = wrapper
+ .findAll('.badge')
+ .wrappers.map(label => label.element.style.backgroundColor);
+
+ expect(nodes.includes(label1.color)).toBe(true);
+ });
+
+ it('does not render label if label does not have an ID', done => {
+ issue.addLabel(
+ new ListLabel({
+ title: 'closed',
+ }),
+ );
+ wrapper.setProps({ issue: { ...issue } });
+ wrapper.vm
+ .$nextTick()
+ .then(() => {
+ expect(wrapper.findAll('.badge').length).toBe(1);
+ expect(wrapper.text()).not.toContain('closed');
+ done();
+ })
+ .catch(done.fail);
+ });
+ });
+});
diff --git a/spec/frontend/jobs/components/log/log_spec.js b/spec/frontend/jobs/components/log/log_spec.js
index cc334009982..7c834542a9a 100644
--- a/spec/frontend/jobs/components/log/log_spec.js
+++ b/spec/frontend/jobs/components/log/log_spec.js
@@ -60,8 +60,8 @@ describe('Job Log', () => {
expect(wrapper.find('.collapsible-line').attributes('role')).toBe('button');
});
- it('renders an icon with the closed state', () => {
- expect(wrapper.find('.collapsible-line svg').classes()).toContain('ic-angle-right');
+ it('renders an icon with the open state', () => {
+ expect(wrapper.find('.collapsible-line svg').classes()).toContain('ic-angle-down');
});
describe('on click header section', () => {
diff --git a/spec/frontend/jobs/store/utils_spec.js b/spec/frontend/jobs/store/utils_spec.js
index 43dacfe622c..8819f39dee0 100644
--- a/spec/frontend/jobs/store/utils_spec.js
+++ b/spec/frontend/jobs/store/utils_spec.js
@@ -26,7 +26,7 @@ describe('Jobs Store Utils', () => {
const parsedHeaderLine = parseHeaderLine(headerLine, 2);
expect(parsedHeaderLine).toEqual({
- isClosed: true,
+ isClosed: false,
isHeader: true,
line: {
...headerLine,
@@ -57,7 +57,7 @@ describe('Jobs Store Utils', () => {
it('adds the section duration to the correct header', () => {
const parsed = [
{
- isClosed: true,
+ isClosed: false,
isHeader: true,
line: {
section: 'prepare-script',
@@ -66,7 +66,7 @@ describe('Jobs Store Utils', () => {
lines: [],
},
{
- isClosed: true,
+ isClosed: false,
isHeader: true,
line: {
section: 'foo-bar',
@@ -85,7 +85,7 @@ describe('Jobs Store Utils', () => {
it('does not add the section duration when the headers do not match', () => {
const parsed = [
{
- isClosed: true,
+ isClosed: false,
isHeader: true,
line: {
section: 'bar-foo',
@@ -94,7 +94,7 @@ describe('Jobs Store Utils', () => {
lines: [],
},
{
- isClosed: true,
+ isClosed: false,
isHeader: true,
line: {
section: 'foo-bar',
@@ -183,7 +183,7 @@ describe('Jobs Store Utils', () => {
describe('collpasible section', () => {
it('adds a `isClosed` property', () => {
- expect(result[1].isClosed).toEqual(true);
+ expect(result[1].isClosed).toEqual(false);
});
it('adds a `isHeader` property', () => {
@@ -213,7 +213,7 @@ describe('Jobs Store Utils', () => {
const existingLog = [
{
isHeader: true,
- isClosed: true,
+ isClosed: false,
line: { content: [{ text: 'bar' }], offset: 10, lineNumber: 1 },
},
];
@@ -263,7 +263,7 @@ describe('Jobs Store Utils', () => {
const existingLog = [
{
isHeader: true,
- isClosed: true,
+ isClosed: false,
lines: [{ offset: 101, content: [{ text: 'foobar' }], lineNumber: 2 }],
line: {
offset: 10,
@@ -435,7 +435,7 @@ describe('Jobs Store Utils', () => {
expect(result).toEqual([
{
- isClosed: true,
+ isClosed: false,
isHeader: true,
line: {
offset: 1,
@@ -461,7 +461,7 @@ describe('Jobs Store Utils', () => {
expect(result).toEqual([
{
- isClosed: true,
+ isClosed: false,
isHeader: true,
line: {
offset: 1,
diff --git a/spec/javascripts/boards/components/issue_time_estimate_spec.js b/spec/javascripts/boards/components/issue_time_estimate_spec.js
deleted file mode 100644
index de48e3f6091..00000000000
--- a/spec/javascripts/boards/components/issue_time_estimate_spec.js
+++ /dev/null
@@ -1,70 +0,0 @@
-import Vue from 'vue';
-import IssueTimeEstimate from '~/boards/components/issue_time_estimate.vue';
-import boardsStore from '~/boards/stores/boards_store';
-import mountComponent from '../../helpers/vue_mount_component_helper';
-
-describe('Issue Time Estimate component', () => {
- let vm;
-
- beforeEach(() => {
- boardsStore.create();
- });
-
- afterEach(() => {
- vm.$destroy();
- });
-
- describe('when limitToHours is false', () => {
- beforeEach(() => {
- boardsStore.timeTracking.limitToHours = false;
-
- const Component = Vue.extend(IssueTimeEstimate);
- vm = mountComponent(Component, {
- estimate: 374460,
- });
- });
-
- it('renders the correct time estimate', () => {
- expect(vm.$el.querySelector('time').textContent.trim()).toEqual('2w 3d 1m');
- });
-
- it('renders expanded time estimate in tooltip', () => {
- expect(vm.$el.querySelector('.js-issue-time-estimate').textContent).toContain(
- '2 weeks 3 days 1 minute',
- );
- });
-
- it('prevents tooltip xss', done => {
- const alertSpy = spyOn(window, 'alert');
- vm.estimate = 'Foo <script>alert("XSS")</script>';
-
- vm.$nextTick(() => {
- expect(alertSpy).not.toHaveBeenCalled();
- expect(vm.$el.querySelector('time').textContent.trim()).toEqual('0m');
- expect(vm.$el.querySelector('.js-issue-time-estimate').textContent).toContain('0m');
- done();
- });
- });
- });
-
- describe('when limitToHours is true', () => {
- beforeEach(() => {
- boardsStore.timeTracking.limitToHours = true;
-
- const Component = Vue.extend(IssueTimeEstimate);
- vm = mountComponent(Component, {
- estimate: 374460,
- });
- });
-
- it('renders the correct time estimate', () => {
- expect(vm.$el.querySelector('time').textContent.trim()).toEqual('104h 1m');
- });
-
- it('renders expanded time estimate in tooltip', () => {
- expect(vm.$el.querySelector('.js-issue-time-estimate').textContent).toContain(
- '104 hours 1 minute',
- );
- });
- });
-});
diff --git a/spec/javascripts/boards/issue_card_spec.js b/spec/javascripts/boards/issue_card_spec.js
deleted file mode 100644
index df2b04cd6df..00000000000
--- a/spec/javascripts/boards/issue_card_spec.js
+++ /dev/null
@@ -1,294 +0,0 @@
-/* global ListAssignee */
-/* global ListLabel */
-/* global ListIssue */
-
-import Vue from 'vue';
-
-import '~/boards/models/label';
-import '~/boards/models/assignee';
-import '~/boards/models/issue';
-import '~/boards/models/list';
-import IssueCardInner from '~/boards/components/issue_card_inner.vue';
-import { listObj } from './mock_data';
-import store from '~/boards/stores';
-
-describe('Issue card component', () => {
- const user = new ListAssignee({
- id: 1,
- name: 'testing 123',
- username: 'test',
- avatar: 'test_image',
- });
- const label1 = new ListLabel({
- id: 3,
- title: 'testing 123',
- color: 'blue',
- text_color: 'white',
- description: 'test',
- });
- let component;
- let issue;
- let list;
-
- beforeEach(() => {
- setFixtures('<div class="test-container"></div>');
-
- list = {
- ...listObj,
- type: 'label',
- };
- issue = new ListIssue({
- title: 'Testing',
- id: 1,
- iid: 1,
- confidential: false,
- labels: [list.label],
- assignees: [],
- reference_path: '#1',
- real_path: '/test/1',
- weight: 1,
- });
-
- component = new Vue({
- el: document.querySelector('.test-container'),
- store,
- components: {
- 'issue-card': IssueCardInner,
- },
- data() {
- return {
- list,
- issue,
- issueLinkBase: '/test',
- rootPath: '/',
- };
- },
- template: `
- <issue-card
- :issue="issue"
- :list="list"
- :issue-link-base="issueLinkBase"
- :root-path="rootPath"></issue-card>
- `,
- });
- });
-
- it('renders issue title', () => {
- expect(component.$el.querySelector('.board-card-title').textContent).toContain(issue.title);
- });
-
- it('includes issue base in link', () => {
- expect(component.$el.querySelector('.board-card-title a').getAttribute('href')).toContain(
- '/test',
- );
- });
-
- it('includes issue title on link', () => {
- expect(component.$el.querySelector('.board-card-title a').getAttribute('title')).toBe(
- issue.title,
- );
- });
-
- it('does not render confidential icon', () => {
- expect(component.$el.querySelector('.fa-eye-flash')).toBeNull();
- });
-
- it('renders confidential icon', done => {
- component.issue.confidential = true;
-
- Vue.nextTick(() => {
- expect(component.$el.querySelector('.confidential-icon')).not.toBeNull();
- done();
- });
- });
-
- it('renders issue ID with #', () => {
- expect(component.$el.querySelector('.board-card-number').textContent).toContain(`#${issue.id}`);
- });
-
- describe('assignee', () => {
- it('does not render assignee', () => {
- expect(component.$el.querySelector('.board-card-assignee .avatar')).toBeNull();
- });
-
- describe('exists', () => {
- beforeEach(done => {
- component.issue.assignees = [user];
-
- Vue.nextTick(() => done());
- });
-
- it('renders assignee', () => {
- expect(component.$el.querySelector('.board-card-assignee .avatar')).not.toBeNull();
- });
-
- it('sets title', () => {
- expect(component.$el.querySelector('.js-assignee-tooltip').textContent).toContain(
- `${user.name}`,
- );
- });
-
- it('sets users path', () => {
- expect(component.$el.querySelector('.board-card-assignee a').getAttribute('href')).toBe(
- '/test',
- );
- });
-
- it('renders avatar', () => {
- expect(component.$el.querySelector('.board-card-assignee img')).not.toBeNull();
- });
- });
-
- describe('assignee default avatar', () => {
- beforeEach(done => {
- component.issue.assignees = [
- new ListAssignee(
- {
- id: 1,
- name: 'testing 123',
- username: 'test',
- },
- 'default_avatar',
- ),
- ];
-
- Vue.nextTick(done);
- });
-
- it('displays defaults avatar if users avatar is null', () => {
- expect(component.$el.querySelector('.board-card-assignee img')).not.toBeNull();
- expect(component.$el.querySelector('.board-card-assignee img').getAttribute('src')).toBe(
- 'default_avatar?width=24',
- );
- });
- });
- });
-
- describe('multiple assignees', () => {
- beforeEach(done => {
- component.issue.assignees = [
- new ListAssignee({
- id: 2,
- name: 'user2',
- username: 'user2',
- avatar: 'test_image',
- }),
- new ListAssignee({
- id: 3,
- name: 'user3',
- username: 'user3',
- avatar: 'test_image',
- }),
- new ListAssignee({
- id: 4,
- name: 'user4',
- username: 'user4',
- avatar: 'test_image',
- }),
- ];
-
- Vue.nextTick(() => done());
- });
-
- it('renders all three assignees', () => {
- expect(component.$el.querySelectorAll('.board-card-assignee .avatar').length).toEqual(3);
- });
-
- describe('more than three assignees', () => {
- beforeEach(done => {
- component.issue.assignees.push(
- new ListAssignee({
- id: 5,
- name: 'user5',
- username: 'user5',
- avatar: 'test_image',
- }),
- );
-
- Vue.nextTick(() => done());
- });
-
- it('renders more avatar counter', () => {
- expect(
- component.$el.querySelector('.board-card-assignee .avatar-counter').innerText.trim(),
- ).toEqual('+2');
- });
-
- it('renders two assignees', () => {
- expect(component.$el.querySelectorAll('.board-card-assignee .avatar').length).toEqual(2);
- });
-
- it('renders 99+ avatar counter', done => {
- for (let i = 5; i < 104; i += 1) {
- const u = new ListAssignee({
- id: i,
- name: 'name',
- username: 'username',
- avatar: 'test_image',
- });
- component.issue.assignees.push(u);
- }
-
- Vue.nextTick(() => {
- expect(
- component.$el.querySelector('.board-card-assignee .avatar-counter').innerText.trim(),
- ).toEqual('99+');
- done();
- });
- });
- });
- });
-
- describe('labels', () => {
- beforeEach(done => {
- component.issue.addLabel(label1);
-
- Vue.nextTick(() => done());
- });
-
- it('does not render list label but renders all other labels', () => {
- expect(component.$el.querySelectorAll('.badge').length).toBe(1);
- });
-
- it('renders label', () => {
- const nodes = [];
- component.$el.querySelectorAll('.badge').forEach(label => {
- nodes.push(label.getAttribute('data-original-title'));
- });
-
- expect(nodes.includes(label1.description)).toBe(true);
- });
-
- it('sets label description as title', () => {
- expect(component.$el.querySelector('.badge').getAttribute('data-original-title')).toContain(
- label1.description,
- );
- });
-
- it('sets background color of button', () => {
- const nodes = [];
- component.$el.querySelectorAll('.badge').forEach(label => {
- nodes.push(label.style.backgroundColor);
- });
-
- expect(nodes.includes(label1.color)).toBe(true);
- });
-
- it('does not render label if label does not have an ID', done => {
- component.issue.addLabel(
- new ListLabel({
- title: 'closed',
- }),
- );
-
- Vue.nextTick()
- .then(() => {
- expect(component.$el.querySelectorAll('.badge').length).toBe(1);
- expect(component.$el.textContent).not.toContain('closed');
-
- done();
- })
- .catch(done.fail);
- });
- });
-});