summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rw-r--r--app/assets/stylesheets/pages/merge_requests.scss4
-rw-r--r--app/views/projects/merge_requests/_show.html.haml26
-rw-r--r--features/steps/project/merge_requests.rb2
4 files changed, 22 insertions, 11 deletions
diff --git a/CHANGELOG b/CHANGELOG
index a157a53d6e6..e14255ee9b2 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -47,6 +47,7 @@ v 7.14.0 (unreleased)
- Add support for CI skipped status
- Fetch code from forks to refs/merge-requests/:id/head when merge request created
- Remove comments and email addresses when publicly exposing ssh keys (Zeger-Jan van de Weg)
+ - Add "Check out branch" button to the MR page.
- Improve MR merge widget text and UI consistency.
- Improve text in MR "How To Merge" modal.
- Cache all events
diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss
index 30bbec7b795..10fce5b3daa 100644
--- a/app/assets/stylesheets/pages/merge_requests.scss
+++ b/app/assets/stylesheets/pages/merge_requests.scss
@@ -186,3 +186,7 @@
#modal_merge_info .modal-dialog {
width: 600px;
}
+
+.mr-source-target {
+ line-height: 31px;
+}
diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml
index 2662e3aff6b..cd53856c4a6 100644
--- a/app/views/projects/merge_requests/_show.html.haml
+++ b/app/views/projects/merge_requests/_show.html.haml
@@ -5,19 +5,25 @@
%hr
= render "projects/merge_requests/show/mr_box"
%hr
- .append-bottom-20
+ .append-bottom-20.mr-source-target
- if @merge_request.open?
- .btn-group.btn-group-sm.pull-right
- %a.btn.btn-sm.dropdown-toggle{ data: {toggle: :dropdown} }
- = icon('download')
- Download as
- %span.caret
- %ul.dropdown-menu
- %li= link_to "Email Patches", merge_request_path(@merge_request, format: :patch)
- %li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff)
+ .pull-right
+ - if @merge_request.source_branch_exists?
+ = link_to "#modal_merge_info", class: "btn btn-sm", "data-toggle" => "modal" do
+ = icon('cloud-download fw')
+ Check out branch
+
+ %span.dropdown
+ %a.btn.btn-sm.dropdown-toggle{ data: {toggle: :dropdown} }
+ = icon('download')
+ Download as
+ %span.caret
+ %ul.dropdown-menu
+ %li= link_to "Email Patches", merge_request_path(@merge_request, format: :patch)
+ %li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff)
.light
%div
- %span From
+ %span Request to merge
%span.label-branch #{source_branch_with_namespace(@merge_request)}
%span into
%span.label-branch #{@merge_request.target_branch}
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index a1a26abd8ca..04784207a1a 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -326,7 +326,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I should see new target branch changes' do
- expect(page).to have_content 'From fix into feature'
+ expect(page).to have_content 'Request to merge fix into feature'
expect(page).to have_content 'Target branch changed from master to feature'
end